{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "name": "yolo_distillation.ipynb",
      "provenance": [],
      "collapsed_sections": []
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    },
    "language_info": {
      "name": "python"
    },
    "accelerator": "GPU",
    "gpuClass": "standard"
  },
  "cells": [
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "d3oy1OfmcDiw"
      },
      "outputs": [],
      "source": [
        "!unzip /content/drive/MyDrive/yolo-distillation.zip -d /content/drive/MyDrive"
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "%cd /content/drive/MyDrive/yolo-distillation"
      ],
      "metadata": {
        "id": "tC3HCszjc5RI",
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "outputId": "b84dc164-a14f-4a54-e4e7-5e0e44e0e70e"
      },
      "execution_count": 1,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "/content/drive/MyDrive/yolo-distillation\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "!pip install -r requirements.txt"
      ],
      "metadata": {
        "id": "XyHH9VfMc_-Z"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "%cd /usr/local/lib/python3.7/dist-packages/torch/nn/modules"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "aVVHUCu0dB5S",
        "outputId": "176ffb06-0feb-4b11-b8c7-b6dd401d0d5b"
      },
      "execution_count": 3,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "/usr/local/lib/python3.7/dist-packages/torch/nn/modules\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "#报错 https://github.com/openai/DALL-E/issues/54\n",
        "#return F.interpolate(input, self.size, self.scale_factor, self.mode, self.align_corners)\n",
        "from google.colab import files\n",
        "files.view('upsampling.py')"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 17
        },
        "id": "B8xAuXJDdHlj",
        "outputId": "ab0b90d9-6bfd-41a0-9522-2f091f6e84cd"
      },
      "execution_count": 4,
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<IPython.core.display.Javascript object>"
            ],
            "application/javascript": [
              "\n",
              "      ((filepath) => {{\n",
              "        if (!google.colab.kernel.accessAllowed) {{\n",
              "          return;\n",
              "        }}\n",
              "        google.colab.files.view(filepath);\n",
              "      }})(\"/usr/local/lib/python3.7/dist-packages/torch/nn/modules/upsampling.py\")"
            ]
          },
          "metadata": {}
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "%cd /content/drive/MyDrive/yolo-distillation"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "-gf3zKNAdOON",
        "outputId": "c285fd62-5143-4c07-b9fb-14beed1af893"
      },
      "execution_count": 12,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "/content/drive/MyDrive/yolo-distillation\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "!python detect.py --source ./data/images/ --weights ./weights/yolov5s.pt"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "zN9--fkqdTnX",
        "outputId": "ef910fa6-4df1-4602-aab7-7ec25c2d7115"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Downloading https://ultralytics.com/assets/Arial.ttf to /root/.config/Ultralytics/Arial.ttf...\n",
            "\u001b[34m\u001b[1mdetect: \u001b[0mweights=['./weights/yolov5s.pt'], source=./data/images/, data=data/coco128.yaml, imgsz=[640, 640], conf_thres=0.25, iou_thres=0.45, max_det=1000, device=, view_img=False, save_txt=False, save_conf=False, save_crop=False, nosave=False, classes=None, agnostic_nms=False, augment=False, visualize=False, update=False, project=runs/detect, name=exp, exist_ok=False, line_thickness=3, hide_labels=False, hide_conf=False, half=False, dnn=False\n",
            "YOLOv5 🚀 2022-2-22 torch 1.12.0+cu113 CPU\n",
            "\n",
            "Fusing layers... \n",
            "Model Summary: 213 layers, 7225885 parameters, 0 gradients, 16.4 GFLOPs\n",
            "image 1/2 /content/drive/MyDrive/yolo-distillation/data/images/bus.jpg: 640x480 4 persons, 1 bus, Done. (0.326s)\n",
            "image 2/2 /content/drive/MyDrive/yolo-distillation/data/images/zidane.jpg: 384x640 2 persons, 2 ties, Done. (0.260s)\n",
            "Speed: 2.2ms pre-process, 292.7ms inference, 12.9ms NMS per image at shape (1, 3, 640, 640)\n",
            "Results saved to \u001b[1mruns/detect/exp\u001b[0m\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "!python train.py --data data/VOC_animal.yaml --cfg models/yolov5s_animal.yaml --weights weights/yolov5s.pt --batch-size 16 --epochs 50 --workers 2 --name yolov5s-baseline"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "4ourgE3rdXEw",
        "outputId": "35710638-b2c1-4348-9815-37c44a1d6f1e"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\u001b[34m\u001b[1mtrain: \u001b[0mweights=weights/yolov5s.pt, cfg=models/yolov5s_animal.yaml, data=data/VOC_animal.yaml, hyp=data/hyps/hyp.scratch-low.yaml, epochs=50, batch_size=16, imgsz=640, rect=False, resume=False, nosave=False, noval=False, noautoanchor=False, evolve=None, bucket=, cache=None, image_weights=False, device=, multi_scale=False, single_cls=False, optimizer=SGD, sync_bn=False, workers=2, project=runs/train, name=yolov5s-baseline, exist_ok=False, quad=False, cos_lr=False, label_smoothing=0.0, patience=100, freeze=[0], save_period=-1, local_rank=-1, entity=None, upload_dataset=False, bbox_interval=-1, artifact_alias=latest\n",
            "\u001b[34m\u001b[1mgithub: \u001b[0mskipping check (not a git repository), for updates see https://github.com/ultralytics/yolov5\n",
            "YOLOv5 🚀 2022-2-22 torch 1.12.0+cu113 CUDA:0 (Tesla T4, 15110MiB)\n",
            "\n",
            "\u001b[34m\u001b[1mhyperparameters: \u001b[0mlr0=0.01, lrf=0.01, momentum=0.937, weight_decay=0.0005, warmup_epochs=3.0, warmup_momentum=0.8, warmup_bias_lr=0.1, box=0.05, cls=0.5, cls_pw=1.0, obj=1.0, obj_pw=1.0, iou_t=0.2, anchor_t=4.0, fl_gamma=0.0, hsv_h=0.015, hsv_s=0.7, hsv_v=0.4, degrees=0.0, translate=0.1, scale=0.5, shear=0.0, perspective=0.0, flipud=0.0, fliplr=0.5, mosaic=1.0, mixup=0.0, copy_paste=0.0\n",
            "\u001b[34m\u001b[1mWeights & Biases: \u001b[0mrun 'pip install wandb' to automatically track and visualize YOLOv5 🚀 runs (RECOMMENDED)\n",
            "\u001b[34m\u001b[1mTensorBoard: \u001b[0mStart with 'tensorboard --logdir runs/train', view at http://localhost:6006/\n",
            "\n",
            "                 from  n    params  module                                  arguments                     \n",
            "  0                -1  1      3520  models.common.Conv                      [3, 32, 6, 2, 2]              \n",
            "  1                -1  1     18560  models.common.Conv                      [32, 64, 3, 2]                \n",
            "  2                -1  1     18816  models.common.C3                        [64, 64, 1]                   \n",
            "  3                -1  1     73984  models.common.Conv                      [64, 128, 3, 2]               \n",
            "  4                -1  2    115712  models.common.C3                        [128, 128, 2]                 \n",
            "  5                -1  1    295424  models.common.Conv                      [128, 256, 3, 2]              \n",
            "  6                -1  3    625152  models.common.C3                        [256, 256, 3]                 \n",
            "  7                -1  1   1180672  models.common.Conv                      [256, 512, 3, 2]              \n",
            "  8                -1  1   1182720  models.common.C3                        [512, 512, 1]                 \n",
            "  9                -1  1    656896  models.common.SPPF                      [512, 512, 5]                 \n",
            " 10                -1  1    131584  models.common.Conv                      [512, 256, 1, 1]              \n",
            " 11                -1  1         0  torch.nn.modules.upsampling.Upsample    [None, 2, 'nearest']          \n",
            " 12           [-1, 6]  1         0  models.common.Concat                    [1]                           \n",
            " 13                -1  1    361984  models.common.C3                        [512, 256, 1, False]          \n",
            " 14                -1  1     33024  models.common.Conv                      [256, 128, 1, 1]              \n",
            " 15                -1  1         0  torch.nn.modules.upsampling.Upsample    [None, 2, 'nearest']          \n",
            " 16           [-1, 4]  1         0  models.common.Concat                    [1]                           \n",
            " 17                -1  1     90880  models.common.C3                        [256, 128, 1, False]          \n",
            " 18                -1  1    147712  models.common.Conv                      [128, 128, 3, 2]              \n",
            " 19          [-1, 14]  1         0  models.common.Concat                    [1]                           \n",
            " 20                -1  1    296448  models.common.C3                        [256, 256, 1, False]          \n",
            " 21                -1  1    590336  models.common.Conv                      [256, 256, 3, 2]              \n",
            " 22          [-1, 10]  1         0  models.common.Concat                    [1]                           \n",
            " 23                -1  1   1182720  models.common.C3                        [512, 512, 1, False]          \n",
            " 24      [17, 20, 23]  1     26970  models.yolo.Detect                      [5, [[10, 13, 16, 30, 33, 23], [30, 61, 62, 45, 59, 119], [116, 90, 156, 198, 373, 326]], [128, 256, 512]]\n",
            "Model Summary: 270 layers, 7033114 parameters, 7033114 gradients, 16.0 GFLOPs\n",
            "\n",
            "Transferred 342/349 items from weights/yolov5s.pt\n",
            "Scaled weight_decay = 0.0005\n",
            "\u001b[34m\u001b[1moptimizer:\u001b[0m SGD with parameter groups 57 weight (no decay), 60 weight, 60 bias\n",
            "\u001b[34m\u001b[1malbumentations: \u001b[0mBlur(always_apply=False, p=0.01, blur_limit=(3, 7)), MedianBlur(always_apply=False, p=0.01, blur_limit=(3, 7)), ToGray(always_apply=False, p=0.01), CLAHE(always_apply=False, p=0.01, clip_limit=(1, 4.0), tile_grid_size=(8, 8))\n",
            "\u001b[34m\u001b[1mtrain: \u001b[0mScanning '/content/drive/MyDrive/yolo-distillation/data/dataset/labels/train' images and labels...991 found, 0 missing, 16 empty, 0 corrupt: 100% 991/991 [10:18<00:00,  1.60it/s]\n",
            "\u001b[34m\u001b[1mtrain: \u001b[0mNew cache created: /content/drive/MyDrive/yolo-distillation/data/dataset/labels/train.cache\n",
            "\u001b[34m\u001b[1mval: \u001b[0mScanning '/content/drive/MyDrive/yolo-distillation/data/dataset/labels/val' images and labels...286 found, 0 missing, 7 empty, 0 corrupt: 100% 286/286 [02:55<00:00,  1.63it/s]\n",
            "\u001b[34m\u001b[1mval: \u001b[0mNew cache created: /content/drive/MyDrive/yolo-distillation/data/dataset/labels/val.cache\n",
            "Plotting labels to runs/train/yolov5s-baseline2/labels.jpg... \n",
            "\n",
            "\u001b[34m\u001b[1mAutoAnchor: \u001b[0m3.64 anchors/target, 1.000 Best Possible Recall (BPR). Current anchors are a good fit to dataset ✅\n",
            "Image sizes 640 train, 640 val\n",
            "Using 2 dataloader workers\n",
            "Logging results to \u001b[1mruns/train/yolov5s-baseline2\u001b[0m\n",
            "Starting training for 50 epochs...\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      0/49     3.74G   0.09883   0.03321   0.04984        59       640: 100% 62/62 [00:41<00:00,  1.48it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.88it/s]\n",
            "                 all        286        396     0.0381      0.156     0.0271    0.00627\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      1/49     5.36G   0.06918   0.03128   0.04088        51       640: 100% 62/62 [00:33<00:00,  1.84it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.30it/s]\n",
            "                 all        286        396      0.734        0.3      0.393      0.163\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      2/49     5.36G   0.05603   0.02576   0.03227        38       640: 100% 62/62 [00:31<00:00,  1.96it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.33it/s]\n",
            "                 all        286        396      0.474      0.633      0.525      0.236\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      3/49     5.36G   0.05368   0.02237   0.02532        43       640: 100% 62/62 [00:31<00:00,  1.98it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.33it/s]\n",
            "                 all        286        396      0.491      0.573      0.557      0.269\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      4/49     5.36G   0.05097   0.02164   0.02156        44       640: 100% 62/62 [00:31<00:00,  1.98it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.49it/s]\n",
            "                 all        286        396      0.703       0.64      0.705      0.374\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      5/49     5.36G   0.05002   0.02045   0.01823        42       640: 100% 62/62 [00:33<00:00,  1.86it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.78it/s]\n",
            "                 all        286        396      0.605      0.615      0.624       0.31\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      6/49     5.36G   0.04882   0.02065   0.02292        47       640: 100% 62/62 [00:31<00:00,  1.96it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.35it/s]\n",
            "                 all        286        396       0.47      0.551      0.486      0.199\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      7/49     5.36G   0.04602   0.02065   0.02429        67       640: 100% 62/62 [00:31<00:00,  1.98it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.56it/s]\n",
            "                 all        286        396       0.38      0.522       0.42      0.203\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      8/49     5.36G   0.04816   0.02066   0.02037        40       640: 100% 62/62 [00:33<00:00,  1.87it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.50it/s]\n",
            "                 all        286        396      0.586      0.582      0.604      0.321\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      9/49     5.36G   0.04569   0.02034   0.01844        52       640: 100% 62/62 [00:31<00:00,  1.98it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.86it/s]\n",
            "                 all        286        396      0.416      0.558      0.464       0.23\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     10/49     5.36G   0.04361   0.02017   0.01794        51       640: 100% 62/62 [00:30<00:00,  2.02it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.38it/s]\n",
            "                 all        286        396       0.68      0.507      0.577      0.311\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     11/49     5.36G   0.04328   0.01986   0.01795        48       640: 100% 62/62 [00:30<00:00,  2.01it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.42it/s]\n",
            "                 all        286        396      0.551      0.663      0.626      0.341\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     12/49     5.36G   0.04313   0.01981   0.01794        35       640: 100% 62/62 [00:32<00:00,  1.90it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.46it/s]\n",
            "                 all        286        396      0.608      0.601      0.619      0.327\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     13/49     5.36G   0.04373   0.02129   0.01916        46       640: 100% 62/62 [00:30<00:00,  2.01it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.41it/s]\n",
            "                 all        286        396      0.544      0.477      0.506      0.261\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     14/49     5.36G   0.04269   0.02045   0.01824        49       640: 100% 62/62 [00:31<00:00,  2.00it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.45it/s]\n",
            "                 all        286        396      0.458      0.512      0.447      0.217\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     15/49     5.36G   0.04127     0.022    0.0212        54       640: 100% 62/62 [00:31<00:00,  1.99it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.45it/s]\n",
            "                 all        286        396      0.422      0.548      0.458      0.219\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     16/49     5.36G   0.04243   0.02361   0.02584        55       640: 100% 62/62 [00:32<00:00,  1.89it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.49it/s]\n",
            "                 all        286        396       0.42      0.311      0.316      0.148\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     17/49     5.36G   0.04235   0.02405   0.02274        56       640: 100% 62/62 [00:31<00:00,  1.99it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.37it/s]\n",
            "                 all        286        396      0.472      0.424      0.386      0.188\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     18/49     5.36G    0.0429    0.0227   0.02333        47       640: 100% 62/62 [00:31<00:00,  1.98it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.52it/s]\n",
            "                 all        286        396       0.46      0.503      0.464      0.221\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     19/49     5.36G   0.03941   0.02303   0.02358        36       640: 100% 62/62 [00:32<00:00,  1.88it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.52it/s]\n",
            "                 all        286        396      0.508      0.546      0.529      0.275\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     20/49     5.36G   0.03934   0.02185   0.02065        42       640: 100% 62/62 [00:30<00:00,  2.00it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.29it/s]\n",
            "                 all        286        396      0.565      0.573      0.565      0.286\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     21/49     5.36G   0.03841   0.02168    0.0183        50       640: 100% 62/62 [00:31<00:00,  1.99it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.43it/s]\n",
            "                 all        286        396      0.659      0.601      0.661      0.364\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     22/49     5.36G   0.03679   0.02164   0.01813        36       640: 100% 62/62 [00:31<00:00,  2.00it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.32it/s]\n",
            "                 all        286        396      0.563      0.556      0.572      0.309\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     23/49     5.36G    0.0356   0.02179    0.0178        51       640: 100% 62/62 [00:32<00:00,  1.90it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.41it/s]\n",
            "                 all        286        396      0.563       0.63      0.618      0.337\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     24/49     5.36G   0.03548   0.02113   0.01692        51       640: 100% 62/62 [00:31<00:00,  1.98it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.56it/s]\n",
            "                 all        286        396      0.668      0.559      0.654      0.367\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     25/49     5.36G   0.03477   0.02022   0.01583        37       640: 100% 62/62 [00:31<00:00,  1.98it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.43it/s]\n",
            "                 all        286        396       0.69      0.645      0.681      0.374\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     26/49     5.36G    0.0343   0.01961   0.01383        38       640: 100% 62/62 [00:30<00:00,  2.00it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.27it/s]\n",
            "                 all        286        396      0.677      0.679       0.71      0.406\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     27/49     5.36G   0.03338   0.01976   0.01158        41       640: 100% 62/62 [00:32<00:00,  1.92it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.37it/s]\n",
            "                 all        286        396      0.747      0.604       0.71      0.414\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     28/49     5.36G    0.0333   0.01914   0.01482        53       640: 100% 62/62 [00:31<00:00,  1.98it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.34it/s]\n",
            "                 all        286        396      0.693      0.639      0.709      0.416\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     29/49     5.36G   0.03216   0.01882   0.01221        43       640: 100% 62/62 [00:30<00:00,  2.00it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.38it/s]\n",
            "                 all        286        396      0.729      0.634      0.692      0.414\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     30/49     5.36G   0.03189   0.01939   0.01109        56       640: 100% 62/62 [00:32<00:00,  1.89it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.42it/s]\n",
            "                 all        286        396       0.72      0.677      0.725      0.431\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     31/49     5.36G   0.03201   0.01846   0.00982        43       640: 100% 62/62 [00:31<00:00,  1.98it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.47it/s]\n",
            "                 all        286        396      0.711      0.701      0.747       0.45\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     32/49     5.36G   0.03113   0.01801    0.0101        42       640: 100% 62/62 [00:30<00:00,  2.01it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.39it/s]\n",
            "                 all        286        396        0.7      0.669      0.734      0.446\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     33/49     5.36G   0.02951   0.01856  0.009544        56       640: 100% 62/62 [00:31<00:00,  1.98it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.63it/s]\n",
            "                 all        286        396       0.77      0.646      0.751      0.473\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     34/49     5.36G   0.02856   0.01759  0.008543        41       640: 100% 62/62 [00:32<00:00,  1.89it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.51it/s]\n",
            "                 all        286        396      0.693      0.706      0.747      0.462\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     35/49     5.36G   0.02893   0.01732  0.009645        53       640: 100% 62/62 [00:31<00:00,  1.98it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.48it/s]\n",
            "                 all        286        396      0.774      0.693      0.785      0.498\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     36/49     5.36G    0.0289   0.01711  0.009756        56       640: 100% 62/62 [00:30<00:00,  2.01it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.37it/s]\n",
            "                 all        286        396      0.721      0.635      0.721      0.465\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     37/49     5.36G   0.02784   0.01785   0.00976        51       640: 100% 62/62 [00:30<00:00,  2.01it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.41it/s]\n",
            "                 all        286        396        0.7      0.719      0.757      0.497\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     38/49     5.36G   0.02707   0.01733  0.007948        46       640: 100% 62/62 [00:32<00:00,  1.91it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.61it/s]\n",
            "                 all        286        396      0.756      0.731      0.784      0.503\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     39/49     5.36G    0.0279    0.0167  0.008131        49       640: 100% 62/62 [00:30<00:00,  2.00it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.47it/s]\n",
            "                 all        286        396      0.727      0.733      0.781      0.503\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     40/49     5.36G   0.02776   0.01696  0.008384        42       640: 100% 62/62 [00:31<00:00,  1.97it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.65it/s]\n",
            "                 all        286        396      0.746      0.718      0.767      0.509\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     41/49     5.36G    0.0266    0.0166  0.007787        51       640: 100% 62/62 [00:32<00:00,  1.90it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.34it/s]\n",
            "                 all        286        396      0.752      0.765      0.805       0.53\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     42/49     5.36G   0.02555    0.0167  0.006858        51       640: 100% 62/62 [00:31<00:00,  1.97it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.41it/s]\n",
            "                 all        286        396      0.795      0.725      0.793       0.52\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     43/49     5.36G   0.02516   0.01592  0.006853        36       640: 100% 62/62 [00:31<00:00,  1.98it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.52it/s]\n",
            "                 all        286        396      0.759      0.743      0.794      0.531\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     44/49     5.36G   0.02515   0.01595  0.007133        53       640: 100% 62/62 [00:31<00:00,  1.98it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.68it/s]\n",
            "                 all        286        396       0.81      0.717      0.811      0.545\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     45/49     5.36G   0.02413    0.0152  0.006894        38       640: 100% 62/62 [00:32<00:00,  1.88it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.55it/s]\n",
            "                 all        286        396      0.774      0.745      0.794      0.531\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     46/49     5.36G   0.02363   0.01499  0.006803        49       640: 100% 62/62 [00:30<00:00,  2.01it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.36it/s]\n",
            "                 all        286        396      0.748      0.763      0.805      0.544\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     47/49     5.36G   0.02342   0.01567  0.006266        43       640: 100% 62/62 [00:30<00:00,  2.00it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.41it/s]\n",
            "                 all        286        396      0.765      0.741      0.804      0.547\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     48/49     5.36G   0.02444   0.01555  0.006349        50       640: 100% 62/62 [00:31<00:00,  2.00it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.38it/s]\n",
            "                 all        286        396      0.771      0.769       0.81      0.542\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     49/49     5.36G    0.0226   0.01554  0.005619        55       640: 100% 62/62 [00:32<00:00,  1.89it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.44it/s]\n",
            "                 all        286        396      0.779       0.77      0.826      0.557\n",
            "\n",
            "50 epochs completed in 0.503 hours.\n",
            "Optimizer stripped from runs/train/yolov5s-baseline2/weights/last.pt, 14.4MB\n",
            "Optimizer stripped from runs/train/yolov5s-baseline2/weights/best.pt, 14.4MB\n",
            "\n",
            "Validating runs/train/yolov5s-baseline2/weights/best.pt...\n",
            "Fusing layers... \n",
            "Model Summary: 213 layers, 7023610 parameters, 0 gradients, 15.8 GFLOPs\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.26it/s]\n",
            "                 all        286        396      0.779       0.77      0.826      0.558\n",
            "                 cat        286         82      0.838      0.886      0.873      0.546\n",
            "                 cow        286         44       0.69      0.758      0.811      0.611\n",
            "               sheep        286         60      0.735        0.6      0.735      0.461\n",
            "                 dog        286        122      0.735      0.751      0.788      0.504\n",
            "               horse        286         88      0.895      0.852      0.923      0.667\n",
            "Results saved to \u001b[1mruns/train/yolov5s-baseline2\u001b[0m\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "!python val.py --data data/VOC_animal.yaml --weights runs/train/yolov5s-baseline/weights/best.pt --batch-size 16"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "KbEfqLuid_OD",
        "outputId": "7724437c-9c81-4354-c429-402da93f3410"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\u001b[34m\u001b[1mval: \u001b[0mdata=data/VOC_animal.yaml, weights=['runs/train/yolov5s-baseline/weights/best.pt'], batch_size=16, imgsz=640, conf_thres=0.001, iou_thres=0.6, task=val, device=, workers=8, single_cls=False, augment=False, verbose=False, save_txt=False, save_hybrid=False, save_conf=False, save_json=False, project=runs/val, name=exp, exist_ok=False, half=False, dnn=False\n",
            "YOLOv5 🚀 2022-2-22 torch 1.12.0+cu113 CUDA:0 (Tesla T4, 15110MiB)\n",
            "\n",
            "Fusing layers... \n",
            "Model Summary: 213 layers, 7023610 parameters, 0 gradients, 15.8 GFLOPs\n",
            "\u001b[34m\u001b[1mval: \u001b[0mScanning '/content/drive/MyDrive/yolo-distillation/data/dataset/labels/val.cache' images and labels... 286 found, 0 missing, 7 empty, 0 corrupt: 100% 286/286 [00:00<?, ?it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 18/18 [00:05<00:00,  3.07it/s]\n",
            "                 all        286        396      0.769      0.787      0.825      0.557\n",
            "                 cat        286         82      0.822      0.902      0.874      0.534\n",
            "                 cow        286         44        0.7      0.795      0.811      0.609\n",
            "               sheep        286         60      0.725      0.615      0.733       0.47\n",
            "                 dog        286        122      0.721       0.77      0.786      0.507\n",
            "               horse        286         88      0.879      0.852      0.922      0.665\n",
            "Speed: 0.4ms pre-process, 5.3ms inference, 3.3ms NMS per image at shape (16, 3, 640, 640)\n",
            "Results saved to \u001b[1mruns/val/exp2\u001b[0m\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "!python train.py --data data/VOC_animal.yaml --cfg models/yolov5l_animal.yaml --weights weights/yolov5l.pt --batch-size 16 --epochs 50 --workers 2 --name yolov5l-baseline"
      ],
      "metadata": {
        "id": "mZv9cUO8eLQt",
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "outputId": "72040b58-6e16-421f-f9e2-08110dffff38"
      },
      "execution_count": 8,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\u001b[34m\u001b[1mtrain: \u001b[0mweights=weights/yolov5l.pt, cfg=models/yolov5l_animal.yaml, data=data/VOC_animal.yaml, hyp=data/hyps/hyp.scratch-low.yaml, epochs=50, batch_size=16, imgsz=640, rect=False, resume=False, nosave=False, noval=False, noautoanchor=False, evolve=None, bucket=, cache=None, image_weights=False, device=, multi_scale=False, single_cls=False, optimizer=SGD, sync_bn=False, workers=2, project=runs/train, name=yolov5l-baseline, exist_ok=False, quad=False, cos_lr=False, label_smoothing=0.0, patience=100, freeze=[0], save_period=-1, local_rank=-1, entity=None, upload_dataset=False, bbox_interval=-1, artifact_alias=latest\n",
            "\u001b[34m\u001b[1mgithub: \u001b[0mskipping check (not a git repository), for updates see https://github.com/ultralytics/yolov5\n",
            "YOLOv5 🚀 2022-2-22 torch 1.12.0+cu113 CUDA:0 (Tesla T4, 15110MiB)\n",
            "\n",
            "\u001b[34m\u001b[1mhyperparameters: \u001b[0mlr0=0.01, lrf=0.01, momentum=0.937, weight_decay=0.0005, warmup_epochs=3.0, warmup_momentum=0.8, warmup_bias_lr=0.1, box=0.05, cls=0.5, cls_pw=1.0, obj=1.0, obj_pw=1.0, iou_t=0.2, anchor_t=4.0, fl_gamma=0.0, hsv_h=0.015, hsv_s=0.7, hsv_v=0.4, degrees=0.0, translate=0.1, scale=0.5, shear=0.0, perspective=0.0, flipud=0.0, fliplr=0.5, mosaic=1.0, mixup=0.0, copy_paste=0.0\n",
            "\u001b[34m\u001b[1mWeights & Biases: \u001b[0mrun 'pip install wandb' to automatically track and visualize YOLOv5 🚀 runs (RECOMMENDED)\n",
            "\u001b[34m\u001b[1mTensorBoard: \u001b[0mStart with 'tensorboard --logdir runs/train', view at http://localhost:6006/\n",
            "\n",
            "                 from  n    params  module                                  arguments                     \n",
            "  0                -1  1      7040  models.common.Conv                      [3, 64, 6, 2, 2]              \n",
            "  1                -1  1     73984  models.common.Conv                      [64, 128, 3, 2]               \n",
            "  2                -1  3    156928  models.common.C3                        [128, 128, 3]                 \n",
            "  3                -1  1    295424  models.common.Conv                      [128, 256, 3, 2]              \n",
            "  4                -1  6   1118208  models.common.C3                        [256, 256, 6]                 \n",
            "  5                -1  1   1180672  models.common.Conv                      [256, 512, 3, 2]              \n",
            "  6                -1  9   6433792  models.common.C3                        [512, 512, 9]                 \n",
            "  7                -1  1   4720640  models.common.Conv                      [512, 1024, 3, 2]             \n",
            "  8                -1  3   9971712  models.common.C3                        [1024, 1024, 3]               \n",
            "  9                -1  1   2624512  models.common.SPPF                      [1024, 1024, 5]               \n",
            " 10                -1  1    525312  models.common.Conv                      [1024, 512, 1, 1]             \n",
            " 11                -1  1         0  torch.nn.modules.upsampling.Upsample    [None, 2, 'nearest']          \n",
            " 12           [-1, 6]  1         0  models.common.Concat                    [1]                           \n",
            " 13                -1  3   2757632  models.common.C3                        [1024, 512, 3, False]         \n",
            " 14                -1  1    131584  models.common.Conv                      [512, 256, 1, 1]              \n",
            " 15                -1  1         0  torch.nn.modules.upsampling.Upsample    [None, 2, 'nearest']          \n",
            " 16           [-1, 4]  1         0  models.common.Concat                    [1]                           \n",
            " 17                -1  3    690688  models.common.C3                        [512, 256, 3, False]          \n",
            " 18                -1  1    590336  models.common.Conv                      [256, 256, 3, 2]              \n",
            " 19          [-1, 14]  1         0  models.common.Concat                    [1]                           \n",
            " 20                -1  3   2495488  models.common.C3                        [512, 512, 3, False]          \n",
            " 21                -1  1   2360320  models.common.Conv                      [512, 512, 3, 2]              \n",
            " 22          [-1, 10]  1         0  models.common.Concat                    [1]                           \n",
            " 23                -1  3   9971712  models.common.C3                        [1024, 1024, 3, False]        \n",
            " 24      [17, 20, 23]  1     53850  models.yolo.Detect                      [5, [[10, 13, 16, 30, 33, 23], [30, 61, 62, 45, 59, 119], [116, 90, 156, 198, 373, 326]], [256, 512, 1024]]\n",
            "Model Summary: 468 layers, 46159834 parameters, 46159834 gradients, 108.3 GFLOPs\n",
            "\n",
            "Transferred 606/613 items from weights/yolov5l.pt\n",
            "Scaled weight_decay = 0.0005\n",
            "\u001b[34m\u001b[1moptimizer:\u001b[0m SGD with parameter groups 101 weight (no decay), 104 weight, 104 bias\n",
            "\u001b[34m\u001b[1malbumentations: \u001b[0mBlur(always_apply=False, p=0.01, blur_limit=(3, 7)), MedianBlur(always_apply=False, p=0.01, blur_limit=(3, 7)), ToGray(always_apply=False, p=0.01), CLAHE(always_apply=False, p=0.01, clip_limit=(1, 4.0), tile_grid_size=(8, 8))\n",
            "\u001b[34m\u001b[1mtrain: \u001b[0mScanning '/content/drive/MyDrive/yolo-distillation/data/dataset/labels/train.cache' images and labels... 991 found, 0 missing, 16 empty, 0 corrupt: 100% 991/991 [00:00<?, ?it/s]\n",
            "\u001b[34m\u001b[1mval: \u001b[0mScanning '/content/drive/MyDrive/yolo-distillation/data/dataset/labels/val.cache' images and labels... 286 found, 0 missing, 7 empty, 0 corrupt: 100% 286/286 [00:00<?, ?it/s]\n",
            "Plotting labels to runs/train/yolov5l-baseline/labels.jpg... \n",
            "\n",
            "\u001b[34m\u001b[1mAutoAnchor: \u001b[0m3.64 anchors/target, 1.000 Best Possible Recall (BPR). Current anchors are a good fit to dataset ✅\n",
            "Image sizes 640 train, 640 val\n",
            "Using 2 dataloader workers\n",
            "Logging results to \u001b[1mruns/train/yolov5l-baseline\u001b[0m\n",
            "Starting training for 50 epochs...\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      0/49     10.1G   0.09477    0.0332   0.04954        40       640: 100% 62/62 [00:47<00:00,  1.29it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.82it/s]\n",
            "                 all        286        396      0.257      0.376      0.303      0.157\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      1/49     12.7G   0.05871   0.02976   0.03777        44       640: 100% 62/62 [00:46<00:00,  1.33it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.11it/s]\n",
            "                 all        286        396      0.598       0.71      0.686      0.344\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      2/49     12.7G   0.05218   0.02162   0.02321        45       640: 100% 62/62 [00:43<00:00,  1.41it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.11it/s]\n",
            "                 all        286        396      0.845      0.647      0.784      0.351\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      3/49     12.7G    0.0521    0.0201   0.01717        53       640: 100% 62/62 [00:44<00:00,  1.40it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.05it/s]\n",
            "                 all        286        396      0.632      0.572      0.638      0.339\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      4/49     12.7G   0.05034   0.01815   0.01445        43       640: 100% 62/62 [00:41<00:00,  1.48it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.04it/s]\n",
            "                 all        286        396       0.58      0.545      0.589      0.277\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      5/49     12.7G   0.04651   0.01732   0.01438        55       640: 100% 62/62 [00:43<00:00,  1.44it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.95it/s]\n",
            "                 all        286        396       0.69      0.693      0.742      0.403\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      6/49     12.7G   0.04407   0.01745   0.01322        45       640: 100% 62/62 [00:42<00:00,  1.45it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.92it/s]\n",
            "                 all        286        396       0.78      0.693      0.797      0.474\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      7/49     12.7G    0.0432   0.01732   0.01299        51       640: 100% 62/62 [00:44<00:00,  1.38it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.00it/s]\n",
            "                 all        286        396      0.746      0.759       0.82      0.504\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      8/49     12.7G   0.04364   0.01655   0.01399        48       640: 100% 62/62 [00:42<00:00,  1.46it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.96it/s]\n",
            "                 all        286        396      0.675      0.638      0.696      0.392\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      9/49     12.7G   0.04172   0.01793   0.01707        55       640: 100% 62/62 [00:42<00:00,  1.45it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.97it/s]\n",
            "                 all        286        396      0.734      0.608       0.69      0.413\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     10/49     12.7G   0.04102   0.01774   0.01621        34       640: 100% 62/62 [00:41<00:00,  1.49it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.97it/s]\n",
            "                 all        286        396      0.673      0.612      0.651      0.374\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     11/49     12.7G   0.04071   0.01758   0.01727        54       640: 100% 62/62 [00:43<00:00,  1.44it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.93it/s]\n",
            "                 all        286        396      0.652      0.672      0.695      0.425\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     12/49     12.7G   0.03739   0.01807   0.01765        47       640: 100% 62/62 [00:41<00:00,  1.48it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.01it/s]\n",
            "                 all        286        396      0.717      0.635      0.707      0.433\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     13/49     12.7G   0.03875   0.01808   0.01596        45       640: 100% 62/62 [00:43<00:00,  1.44it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.91it/s]\n",
            "                 all        286        396      0.726      0.613      0.673      0.418\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     14/49     12.7G   0.03856   0.01788   0.01451        47       640: 100% 62/62 [00:41<00:00,  1.48it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.96it/s]\n",
            "                 all        286        396       0.72      0.582      0.658       0.38\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     15/49     12.7G   0.03879   0.01863    0.0158        50       640: 100% 62/62 [00:42<00:00,  1.45it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.88it/s]\n",
            "                 all        286        396      0.624       0.57      0.587      0.332\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     16/49     12.7G   0.03806   0.01975   0.01856        61       640: 100% 62/62 [00:41<00:00,  1.49it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.02it/s]\n",
            "                 all        286        396       0.52      0.509      0.476      0.279\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     17/49     12.7G   0.03601    0.0196    0.0164        41       640: 100% 62/62 [00:42<00:00,  1.46it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.99it/s]\n",
            "                 all        286        396      0.589      0.505      0.541      0.291\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     18/49     12.7G   0.03567   0.01842   0.01674        48       640: 100% 62/62 [00:41<00:00,  1.49it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.00it/s]\n",
            "                 all        286        396      0.595      0.587      0.627      0.375\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     19/49     12.7G   0.03359   0.01925   0.01547        41       640: 100% 62/62 [00:41<00:00,  1.51it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:05<00:00,  1.55it/s]\n",
            "                 all        286        396        0.7        0.6      0.653      0.394\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     20/49     12.7G   0.03457   0.01922    0.0152        63       640: 100% 62/62 [00:41<00:00,  1.50it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.01it/s]\n",
            "                 all        286        396      0.675      0.542      0.634      0.367\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     21/49     12.7G   0.03301   0.01845   0.01351        74       640: 100% 62/62 [00:41<00:00,  1.50it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.91it/s]\n",
            "                 all        286        396      0.683      0.671      0.697      0.446\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     22/49     12.7G   0.03276   0.01912   0.01312        54       640: 100% 62/62 [00:42<00:00,  1.47it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.96it/s]\n",
            "                 all        286        396      0.677      0.609      0.641      0.407\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     23/49     12.7G   0.03218   0.01857   0.01511        51       640: 100% 62/62 [00:41<00:00,  1.50it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.03it/s]\n",
            "                 all        286        396      0.714      0.639      0.695      0.446\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     24/49     12.7G   0.03145   0.01858   0.01239        61       640: 100% 62/62 [00:42<00:00,  1.45it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.97it/s]\n",
            "                 all        286        396      0.708      0.695      0.735      0.474\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     25/49     12.7G   0.02932   0.01747   0.01209        33       640: 100% 62/62 [00:41<00:00,  1.50it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.92it/s]\n",
            "                 all        286        396      0.677      0.768      0.763      0.494\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     26/49     12.7G   0.02906   0.01732   0.01025        40       640: 100% 62/62 [00:42<00:00,  1.46it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.93it/s]\n",
            "                 all        286        396      0.776      0.671      0.763      0.503\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     27/49     12.7G   0.02903   0.01683  0.009455        41       640: 100% 62/62 [00:41<00:00,  1.50it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.90it/s]\n",
            "                 all        286        396      0.762      0.687      0.756      0.514\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     28/49     12.7G   0.02744   0.01601   0.01066        39       640: 100% 62/62 [00:43<00:00,  1.43it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.90it/s]\n",
            "                 all        286        396      0.731      0.633      0.714      0.475\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     29/49     12.7G   0.02703    0.0159  0.009806        57       640: 100% 62/62 [00:41<00:00,  1.50it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.91it/s]\n",
            "                 all        286        396      0.742      0.695      0.744      0.492\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     30/49     12.7G   0.02671   0.01591  0.009742        34       640: 100% 62/62 [00:42<00:00,  1.45it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.99it/s]\n",
            "                 all        286        396      0.736      0.671      0.725        0.5\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     31/49     12.7G   0.02739   0.01628  0.009154        45       640: 100% 62/62 [00:41<00:00,  1.51it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.96it/s]\n",
            "                 all        286        396      0.751      0.653      0.715      0.487\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     32/49     12.7G   0.02645   0.01635  0.009574        29       640: 100% 62/62 [00:42<00:00,  1.46it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.90it/s]\n",
            "                 all        286        396      0.687      0.751      0.738      0.513\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     33/49     12.7G   0.02654   0.01477  0.009201        39       640: 100% 62/62 [00:41<00:00,  1.49it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.01it/s]\n",
            "                 all        286        396      0.724      0.718      0.729      0.499\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     34/49     12.7G   0.02515   0.01523  0.008251        43       640: 100% 62/62 [00:42<00:00,  1.46it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.94it/s]\n",
            "                 all        286        396      0.755      0.744       0.78       0.54\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     35/49     12.7G   0.02484   0.01506  0.007621        53       640: 100% 62/62 [00:42<00:00,  1.47it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.94it/s]\n",
            "                 all        286        396      0.787      0.739       0.79      0.567\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     36/49     12.7G     0.023   0.01441  0.008366        46       640: 100% 62/62 [00:42<00:00,  1.44it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:05<00:00,  1.75it/s]\n",
            "                 all        286        396      0.797      0.745      0.807      0.575\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     37/49     12.7G   0.02296   0.01455  0.007306        58       640: 100% 62/62 [00:42<00:00,  1.47it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.91it/s]\n",
            "                 all        286        396      0.826      0.733      0.797       0.57\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     38/49     12.7G   0.02207   0.01455  0.006433        29       640: 100% 62/62 [00:41<00:00,  1.50it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:05<00:00,  1.74it/s]\n",
            "                 all        286        396      0.831      0.768      0.823       0.58\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     39/49     12.7G   0.02169   0.01363  0.005273        47       640: 100% 62/62 [00:42<00:00,  1.46it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.91it/s]\n",
            "                 all        286        396      0.786       0.76      0.803      0.569\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     40/49     12.7G   0.02137   0.01338  0.005538        36       640: 100% 62/62 [00:41<00:00,  1.49it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.99it/s]\n",
            "                 all        286        396      0.793      0.785      0.832      0.597\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     41/49     12.7G   0.02073   0.01293  0.005648        43       640: 100% 62/62 [00:43<00:00,  1.43it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.94it/s]\n",
            "                 all        286        396      0.853      0.731      0.835      0.599\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     42/49     12.7G   0.02013   0.01294  0.005868        48       640: 100% 62/62 [00:42<00:00,  1.46it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.06it/s]\n",
            "                 all        286        396      0.854      0.775      0.842      0.606\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     43/49     12.7G   0.02049   0.01317  0.005306        42       640: 100% 62/62 [00:43<00:00,  1.44it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.95it/s]\n",
            "                 all        286        396      0.791      0.791      0.813      0.586\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     44/49     12.7G   0.01983    0.0129  0.006098        47       640: 100% 62/62 [00:41<00:00,  1.49it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.95it/s]\n",
            "                 all        286        396      0.776      0.826      0.829      0.611\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     45/49     12.7G   0.01846   0.01239  0.004401        60       640: 100% 62/62 [00:43<00:00,  1.43it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.94it/s]\n",
            "                 all        286        396      0.834      0.802      0.849      0.618\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     46/49     12.7G   0.01872   0.01219  0.004811        50       640: 100% 62/62 [00:42<00:00,  1.47it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.93it/s]\n",
            "                 all        286        396      0.853      0.778      0.843      0.624\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     47/49     12.7G   0.01863   0.01243  0.004266        46       640: 100% 62/62 [00:43<00:00,  1.43it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.90it/s]\n",
            "                 all        286        396      0.827      0.789       0.84      0.617\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     48/49     12.7G   0.01853   0.01187  0.004817        46       640: 100% 62/62 [00:40<00:00,  1.52it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.99it/s]\n",
            "                 all        286        396       0.84      0.795      0.854      0.627\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     49/49     12.7G   0.01724   0.01186  0.003731        55       640: 100% 62/62 [00:43<00:00,  1.42it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.99it/s]\n",
            "                 all        286        396      0.833      0.808      0.853       0.63\n",
            "\n",
            "50 epochs completed in 0.690 hours.\n",
            "Optimizer stripped from runs/train/yolov5l-baseline/weights/last.pt, 92.9MB\n",
            "Optimizer stripped from runs/train/yolov5l-baseline/weights/best.pt, 92.9MB\n",
            "\n",
            "Validating runs/train/yolov5l-baseline/weights/best.pt...\n",
            "Fusing layers... \n",
            "Model Summary: 367 layers, 46129818 parameters, 0 gradients, 107.7 GFLOPs\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:05<00:00,  1.63it/s]\n",
            "                 all        286        396      0.833      0.808      0.853       0.63\n",
            "                 cat        286         82      0.791      0.866      0.819      0.595\n",
            "                 cow        286         44      0.794      0.841      0.896      0.706\n",
            "               sheep        286         60       0.86      0.717      0.824      0.559\n",
            "                 dog        286        122      0.775      0.754      0.798      0.588\n",
            "               horse        286         88      0.943      0.864      0.928      0.703\n",
            "Results saved to \u001b[1mruns/train/yolov5l-baseline\u001b[0m\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "!python val.py --data data/VOC_animal.yaml --weights runs/train/yolov5l-baseline/weights/best.pt --batch-size 16"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "IHobkVRLXPrj",
        "outputId": "1f744533-ea4c-4db4-9031-6bf43b5a27f4"
      },
      "execution_count": 22,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\u001b[34m\u001b[1mval: \u001b[0mdata=data/VOC_animal.yaml, weights=['runs/train/yolov5l-baseline/weights/best.pt'], batch_size=16, imgsz=640, conf_thres=0.001, iou_thres=0.6, task=val, device=, workers=8, single_cls=False, augment=False, verbose=False, save_txt=False, save_hybrid=False, save_conf=False, save_json=False, project=runs/val, name=exp, exist_ok=False, half=False, dnn=False\n",
            "YOLOv5 🚀 2022-2-22 torch 1.12.0+cu113 CUDA:0 (Tesla T4, 15110MiB)\n",
            "\n",
            "Fusing layers... \n",
            "Model Summary: 367 layers, 46129818 parameters, 0 gradients, 107.7 GFLOPs\n",
            "\u001b[34m\u001b[1mval: \u001b[0mScanning '/content/drive/MyDrive/yolo-distillation/data/dataset/labels/val.cache' images and labels... 286 found, 0 missing, 7 empty, 0 corrupt: 100% 286/286 [00:00<?, ?it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 18/18 [00:08<00:00,  2.15it/s]\n",
            "                 all        286        396      0.863      0.784      0.854      0.629\n",
            "                 cat        286         82      0.819      0.827      0.819      0.591\n",
            "                 cow        286         44      0.857      0.841      0.899      0.708\n",
            "               sheep        286         60      0.881      0.683      0.821      0.558\n",
            "                 dog        286        122      0.804      0.705      0.805      0.587\n",
            "               horse        286         88      0.957      0.864      0.928      0.702\n",
            "Speed: 0.2ms pre-process, 19.8ms inference, 1.7ms NMS per image at shape (16, 3, 640, 640)\n",
            "Results saved to \u001b[1mruns/val/exp6\u001b[0m\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "!python train_distillation.py --weights runs/train/yolov5s-baseline/weights/best.pt --cfg models/yolov5s_animal.yaml --data data/VOC_animal.yaml --batch-size 16 --epochs 100 --workers 2 --t_weights runs/train/yolov5l-baseline/weights/best.pt --hyp data/hyps/hyp.scratch-low-distillation.yaml --distill --dist_loss l2 --name yolov5s-distilled"
      ],
      "metadata": {
        "id": "nF4I1qMDehuI",
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "outputId": "d5d7fb7d-b61e-421c-ff2c-1d121c20122e"
      },
      "execution_count": 10,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\u001b[34m\u001b[1mtrain_distillation: \u001b[0mweights=runs/train/yolov5s-baseline/weights/best.pt, t_weights=runs/train/yolov5l-baseline/weights/best.pt, dist_loss=l2, temperature=20, distill=True, cfg=models/yolov5s_animal.yaml, data=data/VOC_animal.yaml, hyp=data/hyps/hyp.scratch-low-distillation.yaml, epochs=100, batch_size=16, imgsz=640, rect=False, resume=False, nosave=False, noval=False, noautoanchor=False, evolve=None, bucket=, cache=None, image_weights=False, device=, multi_scale=False, single_cls=False, optimizer=SGD, sync_bn=False, workers=2, project=runs/train, name=yolov5s-distilled, exist_ok=False, quad=False, cos_lr=False, label_smoothing=0.0, patience=100, freeze=[0], save_period=-1, local_rank=-1, entity=None, upload_dataset=False, bbox_interval=-1, artifact_alias=latest\n",
            "\u001b[34m\u001b[1mgithub: \u001b[0mskipping check (not a git repository), for updates see https://github.com/ultralytics/yolov5\n",
            "YOLOv5 🚀 2022-2-22 torch 1.12.0+cu113 CUDA:0 (Tesla T4, 15110MiB)\n",
            "\n",
            "\u001b[34m\u001b[1mhyperparameters: \u001b[0mlr0=0.01, lrf=0.01, momentum=0.937, weight_decay=0.0005, warmup_epochs=3.0, warmup_momentum=0.8, warmup_bias_lr=0.1, box=0.05, cls=0.5, cls_pw=1.0, obj=1.0, obj_pw=1.0, iou_t=0.2, anchor_t=4.0, fl_gamma=0.0, hsv_h=0.015, hsv_s=0.7, hsv_v=0.4, degrees=0.0, translate=0.1, scale=0.5, shear=0.0, perspective=0.0, flipud=0.0, fliplr=0.5, mosaic=1.0, mixup=0.0, copy_paste=0.0, dist=1\n",
            "\u001b[34m\u001b[1mWeights & Biases: \u001b[0mrun 'pip install wandb' to automatically track and visualize YOLOv5 🚀 runs (RECOMMENDED)\n",
            "\u001b[34m\u001b[1mTensorBoard: \u001b[0mStart with 'tensorboard --logdir runs/train', view at http://localhost:6006/\n",
            "\n",
            "                 from  n    params  module                                  arguments                     \n",
            "  0                -1  1      3520  models.common.Conv                      [3, 32, 6, 2, 2]              \n",
            "  1                -1  1     18560  models.common.Conv                      [32, 64, 3, 2]                \n",
            "  2                -1  1     18816  models.common.C3                        [64, 64, 1]                   \n",
            "  3                -1  1     73984  models.common.Conv                      [64, 128, 3, 2]               \n",
            "  4                -1  2    115712  models.common.C3                        [128, 128, 2]                 \n",
            "  5                -1  1    295424  models.common.Conv                      [128, 256, 3, 2]              \n",
            "  6                -1  3    625152  models.common.C3                        [256, 256, 3]                 \n",
            "  7                -1  1   1180672  models.common.Conv                      [256, 512, 3, 2]              \n",
            "  8                -1  1   1182720  models.common.C3                        [512, 512, 1]                 \n",
            "  9                -1  1    656896  models.common.SPPF                      [512, 512, 5]                 \n",
            " 10                -1  1    131584  models.common.Conv                      [512, 256, 1, 1]              \n",
            " 11                -1  1         0  torch.nn.modules.upsampling.Upsample    [None, 2, 'nearest']          \n",
            " 12           [-1, 6]  1         0  models.common.Concat                    [1]                           \n",
            " 13                -1  1    361984  models.common.C3                        [512, 256, 1, False]          \n",
            " 14                -1  1     33024  models.common.Conv                      [256, 128, 1, 1]              \n",
            " 15                -1  1         0  torch.nn.modules.upsampling.Upsample    [None, 2, 'nearest']          \n",
            " 16           [-1, 4]  1         0  models.common.Concat                    [1]                           \n",
            " 17                -1  1     90880  models.common.C3                        [256, 128, 1, False]          \n",
            " 18                -1  1    147712  models.common.Conv                      [128, 128, 3, 2]              \n",
            " 19          [-1, 14]  1         0  models.common.Concat                    [1]                           \n",
            " 20                -1  1    296448  models.common.C3                        [256, 256, 1, False]          \n",
            " 21                -1  1    590336  models.common.Conv                      [256, 256, 3, 2]              \n",
            " 22          [-1, 10]  1         0  models.common.Concat                    [1]                           \n",
            " 23                -1  1   1182720  models.common.C3                        [512, 512, 1, False]          \n",
            " 24      [17, 20, 23]  1     26970  models.yolo.Detect                      [5, [[10, 13, 16, 30, 33, 23], [30, 61, 62, 45, 59, 119], [116, 90, 156, 198, 373, 326]], [128, 256, 512]]\n",
            "Model Summary: 270 layers, 7033114 parameters, 7033114 gradients, 16.0 GFLOPs\n",
            "\n",
            "Transferred 348/349 items from runs/train/yolov5s-baseline/weights/best.pt\n",
            "load t-model from runs/train/yolov5l-baseline/weights/best.pt\n",
            "Scaled weight_decay = 0.0005\n",
            "\u001b[34m\u001b[1moptimizer:\u001b[0m SGD with parameter groups 57 weight (no decay), 60 weight, 60 bias\n",
            "\u001b[34m\u001b[1malbumentations: \u001b[0mBlur(always_apply=False, p=0.01, blur_limit=(3, 7)), MedianBlur(always_apply=False, p=0.01, blur_limit=(3, 7)), ToGray(always_apply=False, p=0.01), CLAHE(always_apply=False, p=0.01, clip_limit=(1, 4.0), tile_grid_size=(8, 8))\n",
            "\u001b[34m\u001b[1mtrain: \u001b[0mScanning '/content/drive/MyDrive/yolo-distillation/data/dataset/labels/train.cache' images and labels... 991 found, 0 missing, 16 empty, 0 corrupt: 100% 991/991 [00:00<?, ?it/s]\n",
            "\u001b[34m\u001b[1mval: \u001b[0mScanning '/content/drive/MyDrive/yolo-distillation/data/dataset/labels/val.cache' images and labels... 286 found, 0 missing, 7 empty, 0 corrupt: 100% 286/286 [00:00<?, ?it/s]\n",
            "Plotting labels to runs/train/yolov5s-distilled/labels.jpg... \n",
            "\n",
            "\u001b[34m\u001b[1mAutoAnchor: \u001b[0m3.64 anchors/target, 1.000 Best Possible Recall (BPR). Current anchors are a good fit to dataset ✅\n",
            "tensor([[[1., 1.],\n",
            "         [1., 1.],\n",
            "         [1., 1.]],\n",
            "\n",
            "        [[1., 1.],\n",
            "         [1., 1.],\n",
            "         [1., 1.]],\n",
            "\n",
            "        [[1., 1.],\n",
            "         [1., 1.],\n",
            "         [1., 1.]]], device='cuda:0')\n",
            "Image sizes 640 train, 640 val\n",
            "Using 2 dataloader workers\n",
            "Logging results to \u001b[1mruns/train/yolov5s-distilled\u001b[0m\n",
            "Distillation loss type: l2\n",
            "Starting training for 100 epochs...\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      0/99     4.13G   0.02292   0.01721      1.19    0.4609        59       640: 100% 62/62 [00:42<00:00,  1.46it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.35it/s]\n",
            "                 all        286        396      0.746      0.802      0.827      0.549\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      1/99     4.79G   0.02279   0.01798     1.131     0.386        51       640: 100% 62/62 [00:40<00:00,  1.53it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.52it/s]\n",
            "                 all        286        396      0.795      0.737       0.81      0.536\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      2/99     4.79G   0.02427   0.01897     1.193    0.4017        38       640: 100% 62/62 [00:38<00:00,  1.62it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.23it/s]\n",
            "                 all        286        396      0.776      0.784      0.831      0.555\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      3/99     4.79G    0.0237   0.01871      1.17    0.4015        43       640: 100% 62/62 [00:38<00:00,  1.60it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.83it/s]\n",
            "                 all        286        396       0.75      0.748      0.806      0.518\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      4/99     4.79G   0.02525   0.01989     1.249    0.4401        44       640: 100% 62/62 [00:37<00:00,  1.65it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.18it/s]\n",
            "                 all        286        396      0.782      0.688      0.766       0.47\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      5/99     4.79G   0.02593   0.02018     1.262    0.4397        42       640: 100% 62/62 [00:37<00:00,  1.64it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.17it/s]\n",
            "                 all        286        396      0.808        0.7      0.773      0.468\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      6/99     4.79G   0.02657   0.02149     1.333    0.4562        47       640: 100% 62/62 [00:39<00:00,  1.57it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.52it/s]\n",
            "                 all        286        396        0.7      0.667      0.724      0.434\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      7/99     4.79G   0.02682   0.02141     1.342    0.4686        67       640: 100% 62/62 [00:37<00:00,  1.64it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.39it/s]\n",
            "                 all        286        396      0.786      0.661      0.751      0.464\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      8/99     4.79G   0.03008   0.02272     1.467    0.5189        40       640: 100% 62/62 [00:37<00:00,  1.65it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:05<00:00,  1.65it/s]\n",
            "                 all        286        396      0.767      0.662      0.736       0.43\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      9/99     4.79G   0.03081   0.02364     1.532    0.5519        52       640: 100% 62/62 [00:37<00:00,  1.65it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.23it/s]\n",
            "                 all        286        396      0.748       0.62      0.699       0.39\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     10/99     4.79G   0.03097   0.02396     1.524    0.5279        51       640: 100% 62/62 [00:37<00:00,  1.64it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.25it/s]\n",
            "                 all        286        396      0.668      0.676       0.68      0.391\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     11/99     4.79G   0.03338   0.02565     1.672    0.6036        48       640: 100% 62/62 [00:39<00:00,  1.58it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.32it/s]\n",
            "                 all        286        396      0.589      0.647      0.624      0.327\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     12/99     4.79G   0.03429   0.02832     1.813    0.6502        35       640: 100% 62/62 [00:37<00:00,  1.66it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.26it/s]\n",
            "                 all        286        396      0.691      0.511      0.592      0.304\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     13/99     4.79G   0.03719   0.03267     2.072    0.7706        46       640: 100% 62/62 [00:37<00:00,  1.65it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.93it/s]\n",
            "                 all        286        396      0.578      0.474      0.487      0.215\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     14/99     4.79G   0.03812   0.03513     2.203    0.8081        49       640: 100% 62/62 [00:37<00:00,  1.63it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.36it/s]\n",
            "                 all        286        396      0.434      0.332      0.302      0.116\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     15/99     4.79G   0.03878    0.0408     2.519    0.9586        54       640: 100% 62/62 [00:37<00:00,  1.65it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.21it/s]\n",
            "                 all        286        396      0.427      0.236      0.186     0.0667\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     16/99     4.79G   0.04273    0.0473     2.936     1.118        55       640: 100% 62/62 [00:39<00:00,  1.59it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.13it/s]\n",
            "                 all        286        396      0.417      0.287      0.305      0.119\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     17/99     4.79G   0.04403    0.0473      2.91     1.066        56       640: 100% 62/62 [00:37<00:00,  1.65it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.33it/s]\n",
            "                 all        286        396      0.252      0.428      0.282      0.119\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     18/99     4.79G   0.04278   0.04274     2.727      0.99        47       640: 100% 62/62 [00:37<00:00,  1.66it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.90it/s]\n",
            "                 all        286        396      0.284      0.264      0.245     0.0968\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     19/99     4.79G   0.04108   0.04125     2.567    0.9143        36       640: 100% 62/62 [00:38<00:00,  1.62it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.17it/s]\n",
            "                 all        286        396      0.523      0.476      0.481      0.231\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     20/99     4.79G   0.03934   0.03809     2.413    0.8525        42       640: 100% 62/62 [00:37<00:00,  1.66it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.30it/s]\n",
            "                 all        286        396      0.455      0.452      0.388      0.182\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     21/99     4.79G   0.03978   0.03685     2.341    0.8264        50       640: 100% 62/62 [00:39<00:00,  1.59it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.33it/s]\n",
            "                 all        286        396      0.562      0.455      0.494      0.241\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     22/99     4.79G   0.03908   0.03563     2.255      0.79        36       640: 100% 62/62 [00:37<00:00,  1.65it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.38it/s]\n",
            "                 all        286        396      0.651      0.539      0.603      0.291\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     23/99     4.79G   0.03704   0.03458     2.198    0.7813        51       640: 100% 62/62 [00:37<00:00,  1.65it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.36it/s]\n",
            "                 all        286        396      0.499      0.502        0.5      0.236\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     24/99     4.79G   0.03636   0.03296     2.138    0.7519        51       640: 100% 62/62 [00:39<00:00,  1.58it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.35it/s]\n",
            "                 all        286        396      0.693      0.512      0.581      0.296\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     25/99     4.79G   0.03607   0.03137     2.018    0.7004        37       640: 100% 62/62 [00:37<00:00,  1.66it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.32it/s]\n",
            "                 all        286        396       0.67      0.552      0.603      0.317\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     26/99     4.79G   0.03577   0.03056     1.987    0.6881        38       640: 100% 62/62 [00:39<00:00,  1.58it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.20it/s]\n",
            "                 all        286        396      0.593      0.557      0.581      0.291\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     27/99     4.79G   0.03461   0.03003     1.921    0.6814        41       640: 100% 62/62 [00:37<00:00,  1.66it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.23it/s]\n",
            "                 all        286        396       0.64      0.521      0.572       0.32\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     28/99     4.79G    0.0355   0.02995     1.931    0.6593        53       640: 100% 62/62 [00:37<00:00,  1.66it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.31it/s]\n",
            "                 all        286        396      0.661      0.583      0.615      0.317\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     29/99     4.79G   0.03476   0.02803     1.807    0.6093        43       640: 100% 62/62 [00:39<00:00,  1.59it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.31it/s]\n",
            "                 all        286        396      0.586      0.478      0.517      0.264\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     30/99     4.79G   0.03472   0.02807     1.812    0.6076        56       640: 100% 62/62 [00:37<00:00,  1.66it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.31it/s]\n",
            "                 all        286        396      0.663       0.57      0.589        0.3\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     31/99     4.79G   0.03395   0.02663     1.754    0.5939        43       640: 100% 62/62 [00:38<00:00,  1.60it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.24it/s]\n",
            "                 all        286        396      0.726      0.589       0.68      0.399\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     32/99     4.79G   0.03275   0.02621     1.678    0.5655        42       640: 100% 62/62 [00:37<00:00,  1.65it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.33it/s]\n",
            "                 all        286        396      0.715      0.655      0.705      0.406\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     33/99     4.79G    0.0321   0.02553     1.675    0.5613        56       640: 100% 62/62 [00:37<00:00,  1.67it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.27it/s]\n",
            "                 all        286        396      0.803      0.587      0.703      0.407\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     34/99     4.79G   0.03241   0.02485     1.606    0.5383        41       640: 100% 62/62 [00:38<00:00,  1.61it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.19it/s]\n",
            "                 all        286        396      0.715      0.626      0.702      0.391\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     35/99     4.79G   0.03215   0.02338     1.565    0.5094        53       640: 100% 62/62 [00:37<00:00,  1.66it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.47it/s]\n",
            "                 all        286        396      0.784       0.62      0.719      0.408\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     36/99     4.79G   0.03213   0.02385     1.565    0.5171        56       640: 100% 62/62 [00:36<00:00,  1.68it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:05<00:00,  1.67it/s]\n",
            "                 all        286        396      0.629      0.681      0.681      0.398\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     37/99     4.79G   0.03181   0.02422      1.59    0.5199        51       640: 100% 62/62 [00:37<00:00,  1.67it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.25it/s]\n",
            "                 all        286        396      0.614      0.677      0.681      0.392\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     38/99     4.79G   0.03129    0.0236     1.548    0.5094        46       640: 100% 62/62 [00:36<00:00,  1.68it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.28it/s]\n",
            "                 all        286        396      0.771      0.612      0.719      0.411\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     39/99     4.79G   0.03118   0.02266     1.507    0.4958        49       640: 100% 62/62 [00:39<00:00,  1.59it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.54it/s]\n",
            "                 all        286        396      0.724       0.66      0.732      0.424\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     40/99     4.79G   0.03086   0.02323      1.51    0.4836        42       640: 100% 62/62 [00:36<00:00,  1.69it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.16it/s]\n",
            "                 all        286        396      0.687       0.64      0.693      0.413\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     41/99     4.79G   0.03079   0.02226      1.47    0.4798        51       640: 100% 62/62 [00:37<00:00,  1.67it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.28it/s]\n",
            "                 all        286        396      0.751      0.633      0.711      0.409\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     42/99     4.79G   0.02941   0.02171     1.394    0.4443        51       640: 100% 62/62 [00:38<00:00,  1.61it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.65it/s]\n",
            "                 all        286        396      0.772      0.615      0.699      0.403\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     43/99     4.79G   0.02916   0.02102     1.394    0.4454        36       640: 100% 62/62 [00:36<00:00,  1.70it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.30it/s]\n",
            "                 all        286        396      0.739      0.664      0.715      0.427\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     44/99     4.79G      0.03    0.0212     1.402    0.4507        53       640: 100% 62/62 [00:37<00:00,  1.64it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.52it/s]\n",
            "                 all        286        396       0.73      0.649      0.722      0.419\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     45/99     4.79G   0.02838   0.01965     1.313    0.4162        38       640: 100% 62/62 [00:36<00:00,  1.70it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.39it/s]\n",
            "                 all        286        396      0.757      0.683      0.728      0.445\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     46/99     4.79G   0.02915   0.01962      1.34    0.4198        49       640: 100% 62/62 [00:36<00:00,  1.71it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.38it/s]\n",
            "                 all        286        396      0.737      0.665      0.718      0.437\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     47/99     4.79G   0.02793   0.01966     1.301    0.4057        43       640: 100% 62/62 [00:37<00:00,  1.64it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.31it/s]\n",
            "                 all        286        396       0.77      0.655      0.714      0.444\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     48/99     4.79G   0.02903    0.0198     1.313     0.404        50       640: 100% 62/62 [00:36<00:00,  1.71it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.31it/s]\n",
            "                 all        286        396      0.717      0.672      0.714      0.435\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     49/99     4.79G   0.02755    0.0197     1.293    0.4091        55       640: 100% 62/62 [00:36<00:00,  1.72it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.33it/s]\n",
            "                 all        286        396       0.79      0.659      0.745      0.459\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     50/99     4.79G   0.02851   0.01942     1.298    0.3985        37       640: 100% 62/62 [00:37<00:00,  1.64it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.33it/s]\n",
            "                 all        286        396      0.806      0.624      0.741      0.474\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     51/99     4.79G   0.02654   0.01851     1.223    0.3784        53       640: 100% 62/62 [00:36<00:00,  1.71it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.51it/s]\n",
            "                 all        286        396      0.793      0.682      0.777      0.488\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     52/99     4.79G   0.02714    0.0191     1.238    0.3881        57       640: 100% 62/62 [00:36<00:00,  1.71it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.06it/s]\n",
            "                 all        286        396      0.736      0.665      0.723       0.45\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     53/99     4.79G   0.02693   0.01893     1.223    0.3761        51       640: 100% 62/62 [00:36<00:00,  1.72it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.34it/s]\n",
            "                 all        286        396      0.757       0.71      0.759       0.47\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     54/99     4.79G   0.02624   0.01886      1.23    0.3891        39       640: 100% 62/62 [00:35<00:00,  1.72it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.29it/s]\n",
            "                 all        286        396      0.767      0.644      0.731      0.461\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     55/99     4.79G   0.02602   0.01885      1.22    0.3838        44       640: 100% 62/62 [00:37<00:00,  1.64it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.45it/s]\n",
            "                 all        286        396       0.75      0.681      0.762      0.484\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     56/99     4.79G   0.02657   0.01817     1.181     0.364        49       640: 100% 62/62 [00:35<00:00,  1.73it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.42it/s]\n",
            "                 all        286        396      0.764      0.696      0.779      0.492\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     57/99     4.79G   0.02538   0.01791     1.147    0.3474        49       640: 100% 62/62 [00:36<00:00,  1.70it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.60it/s]\n",
            "                 all        286        396      0.727      0.698      0.764      0.485\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     58/99     4.79G   0.02564   0.01841     1.182    0.3628        44       640: 100% 62/62 [00:37<00:00,  1.65it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.36it/s]\n",
            "                 all        286        396      0.821       0.65      0.772      0.489\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     59/99     4.79G   0.02549   0.01803     1.149    0.3487        49       640: 100% 62/62 [00:36<00:00,  1.72it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.41it/s]\n",
            "                 all        286        396      0.694      0.688      0.733      0.466\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     60/99     4.79G   0.02542   0.01817      1.16    0.3548        42       640: 100% 62/62 [00:36<00:00,  1.70it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.40it/s]\n",
            "                 all        286        396      0.734      0.731      0.766      0.484\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     61/99     4.79G   0.02482   0.01771     1.134    0.3394        69       640: 100% 62/62 [00:37<00:00,  1.65it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.50it/s]\n",
            "                 all        286        396      0.768      0.727      0.773      0.499\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     62/99     4.79G   0.02483   0.01724     1.112    0.3346        46       640: 100% 62/62 [00:36<00:00,  1.70it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.55it/s]\n",
            "                 all        286        396      0.754      0.714      0.761      0.485\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     63/99     4.79G   0.02528   0.01725     1.121    0.3295        42       640: 100% 62/62 [00:37<00:00,  1.65it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.40it/s]\n",
            "                 all        286        396      0.724       0.78      0.798      0.506\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     64/99     4.79G   0.02415    0.0166     1.068    0.3242        41       640: 100% 62/62 [00:37<00:00,  1.66it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.53it/s]\n",
            "                 all        286        396      0.813      0.704      0.782      0.504\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     65/99     4.79G   0.02386    0.0171     1.077     0.333        38       640: 100% 62/62 [00:36<00:00,  1.69it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.44it/s]\n",
            "                 all        286        396      0.844      0.663      0.788      0.519\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     66/99     4.79G   0.02247   0.01662     1.029    0.3106        41       640: 100% 62/62 [00:38<00:00,  1.63it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.34it/s]\n",
            "                 all        286        396      0.771      0.686      0.759      0.487\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     67/99     4.79G   0.02426   0.01645     1.078     0.317        47       640: 100% 62/62 [00:36<00:00,  1.71it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.33it/s]\n",
            "                 all        286        396      0.789      0.707      0.775      0.488\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     68/99     4.79G   0.02389    0.0166     1.057     0.318        57       640: 100% 62/62 [00:36<00:00,  1.69it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.62it/s]\n",
            "                 all        286        396      0.747      0.744      0.786      0.501\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     69/99     4.79G   0.02312   0.01648     1.029    0.3012        47       640: 100% 62/62 [00:37<00:00,  1.65it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.40it/s]\n",
            "                 all        286        396       0.81      0.703      0.797      0.504\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     70/99     4.79G   0.02405   0.01618     1.037    0.2966        47       640: 100% 62/62 [00:36<00:00,  1.70it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.41it/s]\n",
            "                 all        286        396      0.773      0.751      0.814       0.54\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     71/99     4.79G   0.02342   0.01608     1.023    0.2999        43       640: 100% 62/62 [00:36<00:00,  1.72it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:05<00:00,  1.76it/s]\n",
            "                 all        286        396      0.749      0.799      0.815      0.526\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     72/99     4.79G   0.02325   0.01627     1.022    0.2964        48       640: 100% 62/62 [00:36<00:00,  1.72it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.37it/s]\n",
            "                 all        286        396      0.787      0.748      0.803      0.526\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     73/99     4.79G   0.02273   0.01616     1.003     0.285        44       640: 100% 62/62 [00:36<00:00,  1.72it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.37it/s]\n",
            "                 all        286        396      0.781      0.749      0.805      0.529\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     74/99     4.79G   0.02259    0.0159    0.9708    0.2733        33       640: 100% 62/62 [00:38<00:00,  1.62it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.45it/s]\n",
            "                 all        286        396      0.833      0.708      0.807      0.543\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     75/99     4.79G   0.02163   0.01565    0.9764    0.2915        35       640: 100% 62/62 [00:36<00:00,  1.72it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.30it/s]\n",
            "                 all        286        396      0.811      0.747      0.817      0.544\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     76/99     4.79G   0.02216    0.0159     1.001    0.2928        45       640: 100% 62/62 [00:36<00:00,  1.71it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.36it/s]\n",
            "                 all        286        396      0.741      0.732      0.771      0.506\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     77/99     4.79G   0.02186   0.01537    0.9564    0.2792        41       640: 100% 62/62 [00:37<00:00,  1.64it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.47it/s]\n",
            "                 all        286        396      0.842      0.683      0.776      0.499\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     78/99     4.79G   0.02215   0.01585    0.9748    0.2823        51       640: 100% 62/62 [00:36<00:00,  1.69it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.70it/s]\n",
            "                 all        286        396       0.81      0.691      0.792      0.521\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     79/99     4.79G   0.02299   0.01579    0.9889    0.2795        40       640: 100% 62/62 [00:36<00:00,  1.70it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.59it/s]\n",
            "                 all        286        396      0.837      0.713      0.792      0.529\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     80/99     4.79G   0.02245   0.01549    0.9619    0.2772        42       640: 100% 62/62 [00:37<00:00,  1.64it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.49it/s]\n",
            "                 all        286        396      0.843      0.723      0.809      0.535\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     81/99     4.79G   0.02181   0.01541    0.9425    0.2696        45       640: 100% 62/62 [00:36<00:00,  1.71it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.45it/s]\n",
            "                 all        286        396      0.777      0.763      0.813      0.537\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     82/99     4.79G   0.02119   0.01478    0.8938    0.2533        49       640: 100% 62/62 [00:37<00:00,  1.65it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.54it/s]\n",
            "                 all        286        396      0.824      0.704       0.81       0.54\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     83/99     4.79G   0.02161   0.01523    0.9376    0.2705        40       640: 100% 62/62 [00:35<00:00,  1.73it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.37it/s]\n",
            "                 all        286        396       0.82      0.708      0.815      0.543\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     84/99     4.79G   0.02079   0.01497    0.9019    0.2616        40       640: 100% 62/62 [00:36<00:00,  1.69it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.62it/s]\n",
            "                 all        286        396      0.758      0.753      0.807      0.541\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     85/99     4.79G   0.02256   0.01514    0.9347    0.2658        39       640: 100% 62/62 [00:37<00:00,  1.65it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.59it/s]\n",
            "                 all        286        396      0.831      0.675      0.782      0.517\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     86/99     4.79G   0.02054     0.015    0.8877    0.2519        45       640: 100% 62/62 [00:36<00:00,  1.72it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.36it/s]\n",
            "                 all        286        396       0.84      0.697      0.798       0.54\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     87/99     4.79G   0.02054   0.01445    0.8854    0.2431        53       640: 100% 62/62 [00:35<00:00,  1.73it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.42it/s]\n",
            "                 all        286        396      0.766      0.744      0.806      0.536\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     88/99     4.79G   0.02031    0.0145    0.8748    0.2545        48       640: 100% 62/62 [00:37<00:00,  1.66it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.29it/s]\n",
            "                 all        286        396      0.819      0.725       0.81      0.539\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     89/99     4.79G    0.0208   0.01428    0.8705    0.2301        46       640: 100% 62/62 [00:36<00:00,  1.71it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.36it/s]\n",
            "                 all        286        396      0.831      0.708      0.808      0.534\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     90/99     4.79G   0.02045   0.01454    0.8895    0.2539        38       640: 100% 62/62 [00:36<00:00,  1.71it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.05it/s]\n",
            "                 all        286        396      0.812      0.735      0.809      0.536\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     91/99     4.79G   0.02067   0.01425    0.8632    0.2333        39       640: 100% 62/62 [00:36<00:00,  1.71it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.42it/s]\n",
            "                 all        286        396      0.812      0.748       0.82      0.545\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     92/99     4.79G   0.01977   0.01439    0.8531    0.2402        63       640: 100% 62/62 [00:36<00:00,  1.68it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.70it/s]\n",
            "                 all        286        396      0.837      0.727      0.819      0.547\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     93/99     4.79G    0.0199   0.01436    0.8462    0.2385        57       640: 100% 62/62 [00:37<00:00,  1.65it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.36it/s]\n",
            "                 all        286        396      0.836      0.752      0.829      0.553\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     94/99     4.79G   0.02007   0.01432    0.8494    0.2371        60       640: 100% 62/62 [00:36<00:00,  1.71it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.46it/s]\n",
            "                 all        286        396      0.822      0.757      0.827      0.548\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     95/99     4.79G    0.0201   0.01428    0.8612    0.2415        51       640: 100% 62/62 [00:35<00:00,  1.72it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.33it/s]\n",
            "                 all        286        396      0.819      0.748      0.821      0.548\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     96/99     4.79G   0.01998   0.01475    0.8588    0.2426        47       640: 100% 62/62 [00:37<00:00,  1.65it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.70it/s]\n",
            "                 all        286        396      0.847      0.735      0.826      0.549\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     97/99     4.79G    0.0191   0.01451    0.8452    0.2338        58       640: 100% 62/62 [00:36<00:00,  1.71it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.63it/s]\n",
            "                 all        286        396      0.851      0.737       0.83      0.555\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     98/99     4.79G   0.01919   0.01402    0.8226    0.2308        40       640: 100% 62/62 [00:36<00:00,  1.71it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.41it/s]\n",
            "                 all        286        396      0.855      0.734      0.829      0.556\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     99/99     4.79G   0.01837   0.01381    0.8025    0.2203        46       640: 100% 62/62 [00:37<00:00,  1.66it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.44it/s]\n",
            "                 all        286        396      0.859      0.749      0.831      0.554\n",
            "\n",
            "100 epochs completed in 1.162 hours.\n",
            "Optimizer stripped from runs/train/yolov5s-distilled/weights/last.pt, 14.4MB\n",
            "Optimizer stripped from runs/train/yolov5s-distilled/weights/best.pt, 14.4MB\n",
            "\n",
            "Validating runs/train/yolov5s-distilled/weights/best.pt...\n",
            "Fusing layers... \n",
            "Model Summary: 213 layers, 7023610 parameters, 0 gradients, 15.8 GFLOPs\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.08it/s]\n",
            "                 all        286        396      0.854      0.734      0.829      0.556\n",
            "                 cat        286         82      0.804      0.748      0.814      0.512\n",
            "                 cow        286         44      0.864      0.773       0.83      0.624\n",
            "               sheep        286         60      0.891      0.567      0.764      0.472\n",
            "                 dog        286        122      0.838       0.72      0.813      0.534\n",
            "               horse        286         88      0.871      0.864      0.926      0.639\n",
            "Results saved to \u001b[1mruns/train/yolov5s-distilled\u001b[0m\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "!python val.py --data data/VOC_animal.yaml --weights runs/train/yolov5s-distilled/weights/best.pt --batch-size 16"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "59b0LZPBehY1",
        "outputId": "58aaa085-943e-42cd-9e4b-17708c46bdad"
      },
      "execution_count": 25,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\u001b[34m\u001b[1mval: \u001b[0mdata=data/VOC_animal.yaml, weights=['runs/train/yolov5s-distilled/weights/best.pt'], batch_size=16, imgsz=640, conf_thres=0.001, iou_thres=0.6, task=val, device=, workers=8, single_cls=False, augment=False, verbose=False, save_txt=False, save_hybrid=False, save_conf=False, save_json=False, project=runs/val, name=exp, exist_ok=False, half=False, dnn=False\n",
            "YOLOv5 🚀 2022-2-22 torch 1.12.0+cu113 CUDA:0 (Tesla T4, 15110MiB)\n",
            "\n",
            "Fusing layers... \n",
            "Model Summary: 213 layers, 7023610 parameters, 0 gradients, 15.8 GFLOPs\n",
            "\u001b[34m\u001b[1mval: \u001b[0mScanning '/content/drive/MyDrive/yolo-distillation/data/dataset/labels/val.cache' images and labels... 286 found, 0 missing, 7 empty, 0 corrupt: 100% 286/286 [00:00<?, ?it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 18/18 [00:04<00:00,  3.63it/s]\n",
            "                 all        286        396      0.846      0.732      0.826      0.553\n",
            "                 cat        286         82      0.803      0.746      0.815       0.51\n",
            "                 cow        286         44      0.828      0.773      0.814      0.611\n",
            "               sheep        286         60      0.892      0.567      0.764       0.47\n",
            "                 dog        286        122      0.836      0.713       0.81      0.534\n",
            "               horse        286         88      0.872      0.864      0.926      0.641\n",
            "Speed: 0.2ms pre-process, 5.2ms inference, 2.4ms NMS per image at shape (16, 3, 640, 640)\n",
            "Results saved to \u001b[1mruns/val/exp8\u001b[0m\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "!rm -rf /content/drive/MyDrive/yolo-distillation/runs/train/yolov5l-baseline2"
      ],
      "metadata": {
        "id": "sChQjsIfB5HR"
      },
      "execution_count": 21,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "!python train.py --data data/VOC_animal.yaml --cfg models/yolov5n_animal.yaml --weights weights/yolov5n.pt --batch-size 16 --epochs 50 --workers 2 --name yolov5n-baseline"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "p3w_kyI2bodZ",
        "outputId": "67835c8c-4035-4557-f23a-6f0148c84f12"
      },
      "execution_count": 23,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\u001b[34m\u001b[1mtrain: \u001b[0mweights=weights/yolov5n.pt, cfg=models/yolov5n_animal.yaml, data=data/VOC_animal.yaml, hyp=data/hyps/hyp.scratch-low.yaml, epochs=50, batch_size=16, imgsz=640, rect=False, resume=False, nosave=False, noval=False, noautoanchor=False, evolve=None, bucket=, cache=None, image_weights=False, device=, multi_scale=False, single_cls=False, optimizer=SGD, sync_bn=False, workers=2, project=runs/train, name=yolov5n-baseline, exist_ok=False, quad=False, cos_lr=False, label_smoothing=0.0, patience=100, freeze=[0], save_period=-1, local_rank=-1, entity=None, upload_dataset=False, bbox_interval=-1, artifact_alias=latest\n",
            "\u001b[34m\u001b[1mgithub: \u001b[0mskipping check (not a git repository), for updates see https://github.com/ultralytics/yolov5\n",
            "YOLOv5 🚀 2022-2-22 torch 1.12.0+cu113 CUDA:0 (Tesla T4, 15110MiB)\n",
            "\n",
            "\u001b[34m\u001b[1mhyperparameters: \u001b[0mlr0=0.01, lrf=0.01, momentum=0.937, weight_decay=0.0005, warmup_epochs=3.0, warmup_momentum=0.8, warmup_bias_lr=0.1, box=0.05, cls=0.5, cls_pw=1.0, obj=1.0, obj_pw=1.0, iou_t=0.2, anchor_t=4.0, fl_gamma=0.0, hsv_h=0.015, hsv_s=0.7, hsv_v=0.4, degrees=0.0, translate=0.1, scale=0.5, shear=0.0, perspective=0.0, flipud=0.0, fliplr=0.5, mosaic=1.0, mixup=0.0, copy_paste=0.0\n",
            "\u001b[34m\u001b[1mWeights & Biases: \u001b[0mrun 'pip install wandb' to automatically track and visualize YOLOv5 🚀 runs (RECOMMENDED)\n",
            "\u001b[34m\u001b[1mTensorBoard: \u001b[0mStart with 'tensorboard --logdir runs/train', view at http://localhost:6006/\n",
            "\n",
            "                 from  n    params  module                                  arguments                     \n",
            "  0                -1  1      1760  models.common.Conv                      [3, 16, 6, 2, 2]              \n",
            "  1                -1  1      4672  models.common.Conv                      [16, 32, 3, 2]                \n",
            "  2                -1  1      4800  models.common.C3                        [32, 32, 1]                   \n",
            "  3                -1  1     18560  models.common.Conv                      [32, 64, 3, 2]                \n",
            "  4                -1  2     29184  models.common.C3                        [64, 64, 2]                   \n",
            "  5                -1  1     73984  models.common.Conv                      [64, 128, 3, 2]               \n",
            "  6                -1  3    156928  models.common.C3                        [128, 128, 3]                 \n",
            "  7                -1  1    295424  models.common.Conv                      [128, 256, 3, 2]              \n",
            "  8                -1  1    296448  models.common.C3                        [256, 256, 1]                 \n",
            "  9                -1  1    164608  models.common.SPPF                      [256, 256, 5]                 \n",
            " 10                -1  1     33024  models.common.Conv                      [256, 128, 1, 1]              \n",
            " 11                -1  1         0  torch.nn.modules.upsampling.Upsample    [None, 2, 'nearest']          \n",
            " 12           [-1, 6]  1         0  models.common.Concat                    [1]                           \n",
            " 13                -1  1     90880  models.common.C3                        [256, 128, 1, False]          \n",
            " 14                -1  1      8320  models.common.Conv                      [128, 64, 1, 1]               \n",
            " 15                -1  1         0  torch.nn.modules.upsampling.Upsample    [None, 2, 'nearest']          \n",
            " 16           [-1, 4]  1         0  models.common.Concat                    [1]                           \n",
            " 17                -1  1     22912  models.common.C3                        [128, 64, 1, False]           \n",
            " 18                -1  1     36992  models.common.Conv                      [64, 64, 3, 2]                \n",
            " 19          [-1, 14]  1         0  models.common.Concat                    [1]                           \n",
            " 20                -1  1     74496  models.common.C3                        [128, 128, 1, False]          \n",
            " 21                -1  1    147712  models.common.Conv                      [128, 128, 3, 2]              \n",
            " 22          [-1, 10]  1         0  models.common.Concat                    [1]                           \n",
            " 23                -1  1    296448  models.common.C3                        [256, 256, 1, False]          \n",
            " 24      [17, 20, 23]  1     13530  models.yolo.Detect                      [5, [[10, 13, 16, 30, 33, 23], [30, 61, 62, 45, 59, 119], [116, 90, 156, 198, 373, 326]], [64, 128, 256]]\n",
            "Model Summary: 270 layers, 1770682 parameters, 1770682 gradients, 4.2 GFLOPs\n",
            "\n",
            "Transferred 342/349 items from weights/yolov5n.pt\n",
            "Scaled weight_decay = 0.0005\n",
            "\u001b[34m\u001b[1moptimizer:\u001b[0m SGD with parameter groups 57 weight (no decay), 60 weight, 60 bias\n",
            "\u001b[34m\u001b[1malbumentations: \u001b[0mBlur(always_apply=False, p=0.01, blur_limit=(3, 7)), MedianBlur(always_apply=False, p=0.01, blur_limit=(3, 7)), ToGray(always_apply=False, p=0.01), CLAHE(always_apply=False, p=0.01, clip_limit=(1, 4.0), tile_grid_size=(8, 8))\n",
            "\u001b[34m\u001b[1mtrain: \u001b[0mScanning '/content/drive/MyDrive/yolo-distillation/data/dataset/labels/train.cache' images and labels... 991 found, 0 missing, 16 empty, 0 corrupt: 100% 991/991 [00:00<?, ?it/s]\n",
            "\u001b[34m\u001b[1mval: \u001b[0mScanning '/content/drive/MyDrive/yolo-distillation/data/dataset/labels/val.cache' images and labels... 286 found, 0 missing, 7 empty, 0 corrupt: 100% 286/286 [00:00<?, ?it/s]\n",
            "Plotting labels to runs/train/yolov5n-baseline/labels.jpg... \n",
            "\n",
            "\u001b[34m\u001b[1mAutoAnchor: \u001b[0m3.64 anchors/target, 1.000 Best Possible Recall (BPR). Current anchors are a good fit to dataset ✅\n",
            "Image sizes 640 train, 640 val\n",
            "Using 2 dataloader workers\n",
            "Logging results to \u001b[1mruns/train/yolov5n-baseline\u001b[0m\n",
            "Starting training for 50 epochs...\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      0/49     1.85G     0.118   0.03169   0.05741        44       640: 100% 62/62 [00:38<00:00,  1.61it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.99it/s]\n",
            "                 all        286        396     0.0666     0.0637     0.0345    0.00989\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      1/49      2.7G   0.07923   0.03082   0.04679        41       640: 100% 62/62 [00:33<00:00,  1.83it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.07it/s]\n",
            "                 all        286        396       0.36      0.337      0.199     0.0643\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      2/49      2.7G   0.06067   0.02911   0.04088        57       640: 100% 62/62 [00:33<00:00,  1.83it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.08it/s]\n",
            "                 all        286        396      0.371      0.521      0.382      0.149\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      3/49      2.7G   0.05485   0.02658   0.03756        45       640: 100% 62/62 [00:35<00:00,  1.76it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.14it/s]\n",
            "                 all        286        396      0.444      0.524      0.476      0.203\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      4/49      2.7G   0.05267   0.02414   0.03274        47       640: 100% 62/62 [00:33<00:00,  1.88it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.12it/s]\n",
            "                 all        286        396      0.507      0.521       0.48      0.213\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      5/49      2.7G   0.05138   0.02309   0.02945        41       640: 100% 62/62 [00:33<00:00,  1.85it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.10it/s]\n",
            "                 all        286        396      0.461      0.573      0.541      0.254\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      6/49      2.7G   0.05099   0.02257   0.02674        46       640: 100% 62/62 [00:35<00:00,  1.75it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.04it/s]\n",
            "                 all        286        396      0.463      0.549      0.537       0.22\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      7/49      2.7G   0.04997   0.02238   0.02535        59       640: 100% 62/62 [00:34<00:00,  1.82it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.21it/s]\n",
            "                 all        286        396      0.621      0.471      0.552      0.246\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      8/49      2.7G   0.05151   0.02184   0.02441        55       640: 100% 62/62 [00:33<00:00,  1.87it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.17it/s]\n",
            "                 all        286        396       0.52       0.55      0.541      0.234\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      9/49      2.7G   0.04912   0.02152   0.02363        48       640: 100% 62/62 [00:33<00:00,  1.87it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:05<00:00,  1.80it/s]\n",
            "                 all        286        396      0.478      0.459      0.453      0.193\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     10/49      2.7G   0.04758   0.02211   0.02645        53       640: 100% 62/62 [00:33<00:00,  1.88it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.24it/s]\n",
            "                 all        286        396      0.468      0.516      0.428      0.197\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     11/49      2.7G   0.04667    0.0222   0.02377        46       640: 100% 62/62 [00:33<00:00,  1.86it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.23it/s]\n",
            "                 all        286        396      0.637      0.402      0.483      0.214\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     12/49      2.7G   0.04591   0.02173   0.02357        43       640: 100% 62/62 [00:32<00:00,  1.91it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.09it/s]\n",
            "                 all        286        396      0.502      0.429      0.402       0.17\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     13/49      2.7G   0.04697   0.02233   0.02241        45       640: 100% 62/62 [00:34<00:00,  1.79it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.22it/s]\n",
            "                 all        286        396      0.471      0.485      0.446      0.204\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     14/49      2.7G   0.04628   0.02281   0.02151        38       640: 100% 62/62 [00:33<00:00,  1.86it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.10it/s]\n",
            "                 all        286        396      0.493      0.386      0.383      0.169\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     15/49      2.7G   0.04638    0.0227   0.02464        60       640: 100% 62/62 [00:33<00:00,  1.85it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.23it/s]\n",
            "                 all        286        396      0.373      0.509      0.397      0.176\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     16/49      2.7G   0.04348   0.02254   0.02324        52       640: 100% 62/62 [00:33<00:00,  1.87it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:05<00:00,  1.68it/s]\n",
            "                 all        286        396      0.477      0.331      0.316       0.13\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     17/49      2.7G    0.0439   0.02382   0.02399        47       640: 100% 62/62 [00:32<00:00,  1.89it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.13it/s]\n",
            "                 all        286        396      0.442      0.392       0.38      0.149\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     18/49      2.7G   0.04304   0.02416   0.02406        45       640: 100% 62/62 [00:32<00:00,  1.90it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.15it/s]\n",
            "                 all        286        396      0.484      0.397      0.392      0.178\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     19/49      2.7G   0.04242   0.02379    0.0235        53       640: 100% 62/62 [00:32<00:00,  1.90it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.07it/s]\n",
            "                 all        286        396      0.486      0.464       0.43        0.2\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     20/49      2.7G   0.04175   0.02335   0.02385        57       640: 100% 62/62 [00:34<00:00,  1.80it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.21it/s]\n",
            "                 all        286        396      0.393      0.431      0.392      0.164\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     21/49      2.7G    0.0412   0.02343   0.02168        57       640: 100% 62/62 [00:32<00:00,  1.90it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.16it/s]\n",
            "                 all        286        396      0.599      0.438       0.46      0.191\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     22/49      2.7G   0.04048   0.02355   0.02059        53       640: 100% 62/62 [00:32<00:00,  1.91it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.12it/s]\n",
            "                 all        286        396       0.58      0.546      0.542      0.275\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     23/49      2.7G   0.03917   0.02286   0.02095        33       640: 100% 62/62 [00:32<00:00,  1.91it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.11it/s]\n",
            "                 all        286        396      0.577      0.551      0.582      0.278\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     24/49      2.7G   0.03749    0.0229   0.01788        48       640: 100% 62/62 [00:34<00:00,  1.82it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.17it/s]\n",
            "                 all        286        396      0.621      0.559      0.554      0.274\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     25/49      2.7G   0.03749   0.02169   0.01778        41       640: 100% 62/62 [00:32<00:00,  1.88it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.37it/s]\n",
            "                 all        286        396      0.651        0.6      0.627      0.328\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     26/49      2.7G   0.03782   0.02153   0.01668        55       640: 100% 62/62 [00:32<00:00,  1.89it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.27it/s]\n",
            "                 all        286        396      0.556      0.513      0.551      0.277\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     27/49      2.7G   0.03707   0.02257   0.01823        48       640: 100% 62/62 [00:34<00:00,  1.82it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.13it/s]\n",
            "                 all        286        396       0.64      0.496      0.559      0.284\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     28/49      2.7G   0.03611   0.02135   0.01601        44       640: 100% 62/62 [00:33<00:00,  1.87it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.22it/s]\n",
            "                 all        286        396      0.617      0.581      0.619      0.329\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     29/49      2.7G   0.03617   0.02113   0.01607        46       640: 100% 62/62 [00:32<00:00,  1.91it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.15it/s]\n",
            "                 all        286        396      0.567      0.611      0.607      0.326\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     30/49      2.7G   0.03446   0.02168    0.0151        42       640: 100% 62/62 [00:32<00:00,  1.89it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.29it/s]\n",
            "                 all        286        396      0.583      0.624      0.613      0.314\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     31/49      2.7G    0.0336   0.02082   0.01655        44       640: 100% 62/62 [00:34<00:00,  1.82it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.20it/s]\n",
            "                 all        286        396      0.621      0.591      0.598      0.328\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     32/49      2.7G    0.0344     0.021   0.01412        49       640: 100% 62/62 [00:32<00:00,  1.90it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.14it/s]\n",
            "                 all        286        396      0.562       0.65      0.639      0.355\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     33/49      2.7G   0.03346   0.02104   0.01356        47       640: 100% 62/62 [00:32<00:00,  1.90it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.22it/s]\n",
            "                 all        286        396      0.649      0.583      0.637      0.364\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     34/49      2.7G   0.03422   0.02012   0.01369        39       640: 100% 62/62 [00:33<00:00,  1.84it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.80it/s]\n",
            "                 all        286        396      0.599      0.634      0.639      0.361\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     35/49      2.7G   0.03334   0.01983   0.01286        49       640: 100% 62/62 [00:32<00:00,  1.89it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.21it/s]\n",
            "                 all        286        396      0.614      0.642      0.666      0.376\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     36/49      2.7G   0.03264   0.02013     0.012        44       640: 100% 62/62 [00:32<00:00,  1.90it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.54it/s]\n",
            "                 all        286        396      0.615       0.64      0.651      0.377\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     37/49      2.7G   0.03167   0.01946   0.01289        43       640: 100% 62/62 [00:32<00:00,  1.91it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.19it/s]\n",
            "                 all        286        396      0.656      0.622      0.651      0.376\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     38/49      2.7G   0.03179   0.01988   0.01102        47       640: 100% 62/62 [00:33<00:00,  1.84it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.18it/s]\n",
            "                 all        286        396      0.657      0.695        0.7      0.409\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     39/49      2.7G   0.03222   0.01915   0.01195        48       640: 100% 62/62 [00:32<00:00,  1.88it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.46it/s]\n",
            "                 all        286        396      0.704      0.603      0.669      0.392\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     40/49      2.7G   0.03093   0.01924   0.01174        40       640: 100% 62/62 [00:32<00:00,  1.90it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.17it/s]\n",
            "                 all        286        396      0.707      0.639      0.677        0.4\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     41/49      2.7G   0.03012   0.01932   0.01053        35       640: 100% 62/62 [00:32<00:00,  1.92it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.31it/s]\n",
            "                 all        286        396      0.765      0.636      0.721      0.438\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     42/49      2.7G   0.03062   0.01919   0.01067        51       640: 100% 62/62 [00:33<00:00,  1.83it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.30it/s]\n",
            "                 all        286        396      0.769      0.647      0.733      0.435\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     43/49      2.7G   0.02861   0.01884  0.009499        54       640: 100% 62/62 [00:32<00:00,  1.89it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.40it/s]\n",
            "                 all        286        396      0.652      0.697      0.701      0.424\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     44/49      2.7G    0.0286   0.01837  0.009022        46       640: 100% 62/62 [00:32<00:00,  1.91it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.21it/s]\n",
            "                 all        286        396      0.696      0.701      0.713      0.443\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     45/49      2.7G   0.02805   0.01852  0.009686        49       640: 100% 62/62 [00:33<00:00,  1.84it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.17it/s]\n",
            "                 all        286        396      0.675      0.721      0.733      0.454\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     46/49      2.7G   0.02862   0.01793  0.009545        41       640: 100% 62/62 [00:32<00:00,  1.91it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.12it/s]\n",
            "                 all        286        396      0.703       0.69      0.729      0.451\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     47/49      2.7G   0.02799   0.01869  0.009009        50       640: 100% 62/62 [00:32<00:00,  1.90it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.10it/s]\n",
            "                 all        286        396      0.672       0.74      0.734       0.45\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     48/49      2.7G   0.02753    0.0179  0.008881        43       640: 100% 62/62 [00:32<00:00,  1.89it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.28it/s]\n",
            "                 all        286        396      0.696      0.708      0.736      0.465\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     49/49      2.7G   0.02743   0.01794  0.009089        53       640: 100% 62/62 [00:34<00:00,  1.82it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.13it/s]\n",
            "                 all        286        396      0.652      0.759      0.741      0.467\n",
            "\n",
            "50 epochs completed in 0.529 hours.\n",
            "Optimizer stripped from runs/train/yolov5n-baseline/weights/last.pt, 3.9MB\n",
            "Optimizer stripped from runs/train/yolov5n-baseline/weights/best.pt, 3.9MB\n",
            "\n",
            "Validating runs/train/yolov5n-baseline/weights/best.pt...\n",
            "Fusing layers... \n",
            "Model Summary: 213 layers, 1765930 parameters, 0 gradients, 4.1 GFLOPs\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.15it/s]\n",
            "                 all        286        396      0.652      0.758      0.741      0.467\n",
            "                 cat        286         82      0.689      0.829      0.786       0.47\n",
            "                 cow        286         44      0.569       0.78      0.717      0.511\n",
            "               sheep        286         60      0.573      0.633      0.622      0.368\n",
            "                 dog        286        122      0.658      0.708      0.729      0.445\n",
            "               horse        286         88      0.772      0.841      0.853      0.538\n",
            "Results saved to \u001b[1mruns/train/yolov5n-baseline\u001b[0m\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "!python val.py --data data/VOC_animal.yaml --weights runs/train/yolov5n-baseline/weights/best.pt --batch-size 16"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "RIr0LvXSjWa3",
        "outputId": "09520da6-3e7d-470c-cb1f-b979b32aa1a6"
      },
      "execution_count": 24,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\u001b[34m\u001b[1mval: \u001b[0mdata=data/VOC_animal.yaml, weights=['runs/train/yolov5n-baseline/weights/best.pt'], batch_size=16, imgsz=640, conf_thres=0.001, iou_thres=0.6, task=val, device=, workers=8, single_cls=False, augment=False, verbose=False, save_txt=False, save_hybrid=False, save_conf=False, save_json=False, project=runs/val, name=exp, exist_ok=False, half=False, dnn=False\n",
            "YOLOv5 🚀 2022-2-22 torch 1.12.0+cu113 CUDA:0 (Tesla T4, 15110MiB)\n",
            "\n",
            "Fusing layers... \n",
            "Model Summary: 213 layers, 1765930 parameters, 0 gradients, 4.1 GFLOPs\n",
            "\u001b[34m\u001b[1mval: \u001b[0mScanning '/content/drive/MyDrive/yolo-distillation/data/dataset/labels/val.cache' images and labels... 286 found, 0 missing, 7 empty, 0 corrupt: 100% 286/286 [00:00<?, ?it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 18/18 [00:05<00:00,  3.24it/s]\n",
            "                 all        286        396      0.689      0.737      0.745      0.468\n",
            "                 cat        286         82      0.717      0.804      0.794      0.474\n",
            "                 cow        286         44      0.602      0.773      0.724      0.508\n",
            "               sheep        286         60      0.641        0.6      0.627      0.371\n",
            "                 dog        286        122      0.691      0.679       0.73      0.448\n",
            "               horse        286         88      0.794       0.83      0.851      0.536\n",
            "Speed: 0.3ms pre-process, 4.2ms inference, 3.1ms NMS per image at shape (16, 3, 640, 640)\n",
            "Results saved to \u001b[1mruns/val/exp7\u001b[0m\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "!python train_distillation.py --weights runs/train/yolov5n-baseline/weights/best.pt --cfg models/yolov5n_animal.yaml --data data/VOC_animal.yaml --batch-size 16 --epochs 100 --workers 2 --t_weights runs/train/yolov5l-baseline/weights/best.pt --hyp data/hyps/hyp.scratch-low-distillation.yaml --distill --dist_loss l2 --name yolov5n-distilled"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "12DRPMUimLPm",
        "outputId": "42f7df82-be1c-4303-f225-aab5ffdd1839"
      },
      "execution_count": 26,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\u001b[34m\u001b[1mtrain_distillation: \u001b[0mweights=runs/train/yolov5n-baseline/weights/best.pt, t_weights=runs/train/yolov5l-baseline/weights/best.pt, dist_loss=l2, temperature=20, distill=True, cfg=models/yolov5n_animal.yaml, data=data/VOC_animal.yaml, hyp=data/hyps/hyp.scratch-low-distillation.yaml, epochs=100, batch_size=16, imgsz=640, rect=False, resume=False, nosave=False, noval=False, noautoanchor=False, evolve=None, bucket=, cache=None, image_weights=False, device=, multi_scale=False, single_cls=False, optimizer=SGD, sync_bn=False, workers=2, project=runs/train, name=yolov5n-distilled, exist_ok=False, quad=False, cos_lr=False, label_smoothing=0.0, patience=100, freeze=[0], save_period=-1, local_rank=-1, entity=None, upload_dataset=False, bbox_interval=-1, artifact_alias=latest\n",
            "\u001b[34m\u001b[1mgithub: \u001b[0mskipping check (not a git repository), for updates see https://github.com/ultralytics/yolov5\n",
            "YOLOv5 🚀 2022-2-22 torch 1.12.0+cu113 CUDA:0 (Tesla T4, 15110MiB)\n",
            "\n",
            "\u001b[34m\u001b[1mhyperparameters: \u001b[0mlr0=0.01, lrf=0.01, momentum=0.937, weight_decay=0.0005, warmup_epochs=3.0, warmup_momentum=0.8, warmup_bias_lr=0.1, box=0.05, cls=0.5, cls_pw=1.0, obj=1.0, obj_pw=1.0, iou_t=0.2, anchor_t=4.0, fl_gamma=0.0, hsv_h=0.015, hsv_s=0.7, hsv_v=0.4, degrees=0.0, translate=0.1, scale=0.5, shear=0.0, perspective=0.0, flipud=0.0, fliplr=0.5, mosaic=1.0, mixup=0.0, copy_paste=0.0, dist=0.5\n",
            "\u001b[34m\u001b[1mWeights & Biases: \u001b[0mrun 'pip install wandb' to automatically track and visualize YOLOv5 🚀 runs (RECOMMENDED)\n",
            "\u001b[34m\u001b[1mTensorBoard: \u001b[0mStart with 'tensorboard --logdir runs/train', view at http://localhost:6006/\n",
            "\n",
            "                 from  n    params  module                                  arguments                     \n",
            "  0                -1  1      1760  models.common.Conv                      [3, 16, 6, 2, 2]              \n",
            "  1                -1  1      4672  models.common.Conv                      [16, 32, 3, 2]                \n",
            "  2                -1  1      4800  models.common.C3                        [32, 32, 1]                   \n",
            "  3                -1  1     18560  models.common.Conv                      [32, 64, 3, 2]                \n",
            "  4                -1  2     29184  models.common.C3                        [64, 64, 2]                   \n",
            "  5                -1  1     73984  models.common.Conv                      [64, 128, 3, 2]               \n",
            "  6                -1  3    156928  models.common.C3                        [128, 128, 3]                 \n",
            "  7                -1  1    295424  models.common.Conv                      [128, 256, 3, 2]              \n",
            "  8                -1  1    296448  models.common.C3                        [256, 256, 1]                 \n",
            "  9                -1  1    164608  models.common.SPPF                      [256, 256, 5]                 \n",
            " 10                -1  1     33024  models.common.Conv                      [256, 128, 1, 1]              \n",
            " 11                -1  1         0  torch.nn.modules.upsampling.Upsample    [None, 2, 'nearest']          \n",
            " 12           [-1, 6]  1         0  models.common.Concat                    [1]                           \n",
            " 13                -1  1     90880  models.common.C3                        [256, 128, 1, False]          \n",
            " 14                -1  1      8320  models.common.Conv                      [128, 64, 1, 1]               \n",
            " 15                -1  1         0  torch.nn.modules.upsampling.Upsample    [None, 2, 'nearest']          \n",
            " 16           [-1, 4]  1         0  models.common.Concat                    [1]                           \n",
            " 17                -1  1     22912  models.common.C3                        [128, 64, 1, False]           \n",
            " 18                -1  1     36992  models.common.Conv                      [64, 64, 3, 2]                \n",
            " 19          [-1, 14]  1         0  models.common.Concat                    [1]                           \n",
            " 20                -1  1     74496  models.common.C3                        [128, 128, 1, False]          \n",
            " 21                -1  1    147712  models.common.Conv                      [128, 128, 3, 2]              \n",
            " 22          [-1, 10]  1         0  models.common.Concat                    [1]                           \n",
            " 23                -1  1    296448  models.common.C3                        [256, 256, 1, False]          \n",
            " 24      [17, 20, 23]  1     13530  models.yolo.Detect                      [5, [[10, 13, 16, 30, 33, 23], [30, 61, 62, 45, 59, 119], [116, 90, 156, 198, 373, 326]], [64, 128, 256]]\n",
            "Model Summary: 270 layers, 1770682 parameters, 1770682 gradients, 4.2 GFLOPs\n",
            "\n",
            "Transferred 348/349 items from runs/train/yolov5n-baseline/weights/best.pt\n",
            "load t-model from runs/train/yolov5l-baseline/weights/best.pt\n",
            "Scaled weight_decay = 0.0005\n",
            "\u001b[34m\u001b[1moptimizer:\u001b[0m SGD with parameter groups 57 weight (no decay), 60 weight, 60 bias\n",
            "\u001b[34m\u001b[1malbumentations: \u001b[0mBlur(always_apply=False, p=0.01, blur_limit=(3, 7)), MedianBlur(always_apply=False, p=0.01, blur_limit=(3, 7)), ToGray(always_apply=False, p=0.01), CLAHE(always_apply=False, p=0.01, clip_limit=(1, 4.0), tile_grid_size=(8, 8))\n",
            "\u001b[34m\u001b[1mtrain: \u001b[0mScanning '/content/drive/MyDrive/yolo-distillation/data/dataset/labels/train.cache' images and labels... 991 found, 0 missing, 16 empty, 0 corrupt: 100% 991/991 [00:00<?, ?it/s]\n",
            "\u001b[34m\u001b[1mval: \u001b[0mScanning '/content/drive/MyDrive/yolo-distillation/data/dataset/labels/val.cache' images and labels... 286 found, 0 missing, 7 empty, 0 corrupt: 100% 286/286 [00:00<?, ?it/s]\n",
            "Plotting labels to runs/train/yolov5n-distilled/labels.jpg... \n",
            "\n",
            "\u001b[34m\u001b[1mAutoAnchor: \u001b[0m3.64 anchors/target, 1.000 Best Possible Recall (BPR). Current anchors are a good fit to dataset ✅\n",
            "tensor([[[1., 1.],\n",
            "         [1., 1.],\n",
            "         [1., 1.]],\n",
            "\n",
            "        [[1., 1.],\n",
            "         [1., 1.],\n",
            "         [1., 1.]],\n",
            "\n",
            "        [[1., 1.],\n",
            "         [1., 1.],\n",
            "         [1., 1.]]], device='cuda:0')\n",
            "Image sizes 640 train, 640 val\n",
            "Using 2 dataloader workers\n",
            "Logging results to \u001b[1mruns/train/yolov5n-distilled\u001b[0m\n",
            "Distillation loss type: l2\n",
            "Starting training for 100 epochs...\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      0/99     2.81G   0.02653   0.02091     1.239    0.3464        44       640: 100% 62/62 [00:42<00:00,  1.45it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.17it/s]\n",
            "                 all        286        396      0.719      0.669      0.732      0.452\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      1/99     3.16G   0.02713   0.02253     1.243    0.3165        41       640: 100% 62/62 [00:39<00:00,  1.57it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.23it/s]\n",
            "                 all        286        396      0.733      0.649      0.714      0.437\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      2/99     3.16G   0.02783   0.02295      1.27     0.324        57       640: 100% 62/62 [00:38<00:00,  1.62it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.30it/s]\n",
            "                 all        286        396      0.776      0.623      0.716      0.436\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      3/99     3.16G   0.02833   0.02258     1.238    0.3024        45       640: 100% 62/62 [00:38<00:00,  1.63it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.38it/s]\n",
            "                 all        286        396      0.642      0.677      0.698      0.423\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      4/99     3.16G   0.02891   0.02269     1.256    0.3071        47       640: 100% 62/62 [00:36<00:00,  1.68it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:05<00:00,  1.66it/s]\n",
            "                 all        286        396      0.683      0.697      0.721      0.437\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      5/99     3.16G    0.0304   0.02293     1.318    0.3206        41       640: 100% 62/62 [00:37<00:00,  1.67it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.43it/s]\n",
            "                 all        286        396      0.655      0.644      0.672      0.387\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      6/99     3.16G   0.03052   0.02396     1.353    0.3316        46       640: 100% 62/62 [00:36<00:00,  1.69it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.29it/s]\n",
            "                 all        286        396      0.661      0.645      0.676       0.37\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      7/99     3.16G    0.0309   0.02381     1.354    0.3276        59       640: 100% 62/62 [00:36<00:00,  1.68it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.23it/s]\n",
            "                 all        286        396      0.615      0.649      0.661      0.381\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      8/99     3.16G   0.03287    0.0241     1.401    0.3393        55       640: 100% 62/62 [00:38<00:00,  1.62it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.31it/s]\n",
            "                 all        286        396      0.637      0.633      0.635      0.349\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "      9/99     3.16G   0.03381   0.02421     1.426    0.3505        48       640: 100% 62/62 [00:36<00:00,  1.68it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.26it/s]\n",
            "                 all        286        396       0.61      0.606      0.637      0.327\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     10/99     3.16G   0.03679   0.02645     1.606    0.3889        53       640: 100% 62/62 [00:36<00:00,  1.69it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.33it/s]\n",
            "                 all        286        396       0.62      0.471      0.511      0.236\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     11/99     3.16G   0.03515   0.02622     1.544    0.3828        46       640: 100% 62/62 [00:38<00:00,  1.62it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.33it/s]\n",
            "                 all        286        396      0.546       0.57      0.572      0.265\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     12/99     3.16G   0.03565   0.02705     1.603    0.4118        43       640: 100% 62/62 [00:36<00:00,  1.70it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.41it/s]\n",
            "                 all        286        396      0.609      0.576      0.598      0.302\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     13/99     3.16G   0.03935   0.02776     1.701    0.4174        45       640: 100% 62/62 [00:36<00:00,  1.70it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.31it/s]\n",
            "                 all        286        396      0.605      0.556      0.592      0.298\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     14/99     3.16G   0.04009   0.02934     1.736    0.4411        38       640: 100% 62/62 [00:36<00:00,  1.70it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.21it/s]\n",
            "                 all        286        396      0.524      0.474      0.457      0.217\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     15/99     3.16G   0.04168   0.03049     1.887     0.496        60       640: 100% 62/62 [00:37<00:00,  1.64it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.36it/s]\n",
            "                 all        286        396      0.459      0.346      0.304      0.111\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     16/99     3.16G   0.04057   0.03229     1.975    0.5251        52       640: 100% 62/62 [00:36<00:00,  1.71it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.20it/s]\n",
            "                 all        286        396      0.494      0.349      0.317      0.128\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     17/99     3.16G   0.04032   0.03277     2.009    0.5373        47       640: 100% 62/62 [00:36<00:00,  1.69it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.30it/s]\n",
            "                 all        286        396      0.396      0.418      0.384      0.154\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     18/99     3.16G   0.04246   0.03589     2.158    0.5868        45       640: 100% 62/62 [00:37<00:00,  1.64it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.29it/s]\n",
            "                 all        286        396      0.447      0.239      0.249      0.084\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     19/99     3.16G   0.04149   0.03405     2.055    0.5341        53       640: 100% 62/62 [00:36<00:00,  1.71it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.24it/s]\n",
            "                 all        286        396      0.324      0.342      0.279      0.111\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     20/99     3.16G   0.04051   0.03289     2.026    0.5369        57       640: 100% 62/62 [00:36<00:00,  1.69it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.40it/s]\n",
            "                 all        286        396      0.526      0.434       0.46      0.198\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     21/99     3.16G    0.0402   0.03282     1.971    0.5099        57       640: 100% 62/62 [00:36<00:00,  1.70it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.30it/s]\n",
            "                 all        286        396      0.514       0.55      0.507      0.246\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     22/99     3.16G   0.03992   0.03256     1.939    0.5199        53       640: 100% 62/62 [00:37<00:00,  1.65it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.20it/s]\n",
            "                 all        286        396      0.542      0.377      0.414      0.195\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     23/99     3.16G   0.03924     0.031     1.878    0.4737        33       640: 100% 62/62 [00:36<00:00,  1.71it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.31it/s]\n",
            "                 all        286        396       0.54      0.509      0.522      0.217\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     24/99     3.16G   0.03776   0.03076     1.794    0.4578        48       640: 100% 62/62 [00:36<00:00,  1.69it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.26it/s]\n",
            "                 all        286        396      0.593      0.464      0.481      0.228\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     25/99     3.16G   0.03768   0.02904     1.788    0.4459        41       640: 100% 62/62 [00:38<00:00,  1.62it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.14it/s]\n",
            "                 all        286        396      0.484      0.534        0.5      0.231\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     26/99     3.16G   0.03717    0.0286     1.707    0.4235        55       640: 100% 62/62 [00:37<00:00,  1.67it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.25it/s]\n",
            "                 all        286        396      0.569      0.535      0.496      0.233\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     27/99     3.16G   0.03713   0.02867     1.683    0.4141        48       640: 100% 62/62 [00:37<00:00,  1.68it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.28it/s]\n",
            "                 all        286        396      0.774      0.477      0.593        0.3\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     28/99     3.16G   0.03587   0.02678     1.592    0.3843        44       640: 100% 62/62 [00:37<00:00,  1.66it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  1.88it/s]\n",
            "                 all        286        396      0.613      0.589      0.612       0.31\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     29/99     3.16G   0.03542   0.02586     1.552    0.3771        46       640: 100% 62/62 [00:37<00:00,  1.67it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.19it/s]\n",
            "                 all        286        396      0.575      0.637      0.614      0.322\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     30/99     3.16G   0.03489   0.02682     1.556    0.3713        42       640: 100% 62/62 [00:37<00:00,  1.67it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.25it/s]\n",
            "                 all        286        396      0.604      0.659      0.656      0.339\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     31/99     3.16G   0.03331   0.02557     1.516    0.3623        44       640: 100% 62/62 [00:37<00:00,  1.66it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.36it/s]\n",
            "                 all        286        396      0.624      0.573       0.59      0.304\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     32/99     3.16G   0.03478   0.02545      1.51    0.3591        49       640: 100% 62/62 [00:38<00:00,  1.62it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.22it/s]\n",
            "                 all        286        396      0.625      0.534      0.568      0.295\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     33/99     3.16G   0.03376   0.02566     1.498    0.3596        47       640: 100% 62/62 [00:36<00:00,  1.68it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.32it/s]\n",
            "                 all        286        396      0.632      0.639      0.649      0.333\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     34/99     3.16G   0.03411   0.02446     1.482    0.3406        39       640: 100% 62/62 [00:36<00:00,  1.68it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.47it/s]\n",
            "                 all        286        396      0.659      0.558      0.629      0.347\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     35/99     3.16G   0.03491   0.02431     1.473    0.3346        49       640: 100% 62/62 [00:38<00:00,  1.61it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.27it/s]\n",
            "                 all        286        396      0.579      0.525      0.549      0.293\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     36/99     3.16G   0.03371   0.02493      1.49    0.3415        44       640: 100% 62/62 [00:37<00:00,  1.68it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.22it/s]\n",
            "                 all        286        396      0.694      0.597      0.664      0.354\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     37/99     3.16G     0.033   0.02423     1.462    0.3392        43       640: 100% 62/62 [00:36<00:00,  1.68it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.30it/s]\n",
            "                 all        286        396      0.583      0.626      0.629      0.361\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     38/99     3.16G   0.03385   0.02471     1.439    0.3276        47       640: 100% 62/62 [00:36<00:00,  1.71it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.49it/s]\n",
            "                 all        286        396      0.646      0.599      0.625      0.339\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     39/99     3.16G   0.03366   0.02345     1.433    0.3221        48       640: 100% 62/62 [00:37<00:00,  1.63it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.42it/s]\n",
            "                 all        286        396      0.688      0.608      0.654      0.359\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     40/99     3.16G   0.03314   0.02339     1.422     0.327        40       640: 100% 62/62 [00:36<00:00,  1.72it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.35it/s]\n",
            "                 all        286        396      0.667       0.58      0.624      0.337\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     41/99     3.16G   0.03305   0.02325     1.392    0.3142        35       640: 100% 62/62 [00:35<00:00,  1.73it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.46it/s]\n",
            "                 all        286        396      0.602      0.672      0.638      0.361\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     42/99     3.16G   0.03252   0.02339     1.406    0.3132        51       640: 100% 62/62 [00:37<00:00,  1.66it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.26it/s]\n",
            "                 all        286        396      0.643      0.645      0.646      0.346\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     43/99     3.16G    0.0319   0.02328     1.366    0.3109        54       640: 100% 62/62 [00:36<00:00,  1.71it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.39it/s]\n",
            "                 all        286        396      0.659      0.626      0.657      0.365\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     44/99     3.16G   0.03208   0.02265     1.336    0.2979        46       640: 100% 62/62 [00:36<00:00,  1.70it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.58it/s]\n",
            "                 all        286        396      0.678      0.626      0.683      0.376\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     45/99     3.16G   0.03177   0.02266     1.339     0.303        49       640: 100% 62/62 [00:36<00:00,  1.71it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.38it/s]\n",
            "                 all        286        396      0.687      0.615      0.655      0.363\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     46/99     3.16G   0.03157   0.02208     1.324    0.2941        41       640: 100% 62/62 [00:37<00:00,  1.65it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.24it/s]\n",
            "                 all        286        396      0.628      0.596      0.634      0.354\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     47/99     3.16G   0.03173    0.0226     1.329     0.289        50       640: 100% 62/62 [00:36<00:00,  1.72it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.41it/s]\n",
            "                 all        286        396      0.654      0.635      0.646      0.342\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     48/99     3.16G   0.03042   0.02214     1.298    0.2981        43       640: 100% 62/62 [00:35<00:00,  1.73it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.33it/s]\n",
            "                 all        286        396      0.694       0.62      0.641      0.353\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     49/99     3.16G   0.03071   0.02207     1.313    0.2985        53       640: 100% 62/62 [00:37<00:00,  1.66it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.25it/s]\n",
            "                 all        286        396      0.722      0.601      0.676      0.378\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     50/99     3.16G   0.03023   0.02203      1.27    0.2845        49       640: 100% 62/62 [00:36<00:00,  1.72it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.49it/s]\n",
            "                 all        286        396      0.707      0.647      0.686      0.394\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     51/99     3.16G   0.03072   0.02158     1.289     0.281        46       640: 100% 62/62 [00:35<00:00,  1.72it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.39it/s]\n",
            "                 all        286        396      0.676      0.684      0.691      0.411\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     52/99     3.16G   0.03033   0.02209     1.283    0.2817        41       640: 100% 62/62 [00:36<00:00,  1.72it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.44it/s]\n",
            "                 all        286        396      0.708       0.62      0.667      0.372\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     53/99     3.16G   0.03069   0.02145     1.264    0.2737        38       640: 100% 62/62 [00:37<00:00,  1.67it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.34it/s]\n",
            "                 all        286        396      0.725      0.605      0.673      0.374\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     54/99     3.16G   0.02922   0.02206     1.246    0.2788        41       640: 100% 62/62 [00:36<00:00,  1.69it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.52it/s]\n",
            "                 all        286        396      0.691      0.646      0.697      0.404\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     55/99     3.16G   0.02959   0.02039     1.206     0.259        56       640: 100% 62/62 [00:35<00:00,  1.73it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.27it/s]\n",
            "                 all        286        396      0.668      0.607      0.646      0.369\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     56/99     3.16G   0.02899   0.02048     1.197    0.2639        34       640: 100% 62/62 [00:37<00:00,  1.67it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.45it/s]\n",
            "                 all        286        396      0.667      0.658      0.667      0.383\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     57/99     3.16G    0.0286   0.02065     1.204    0.2621        52       640: 100% 62/62 [00:35<00:00,  1.75it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.30it/s]\n",
            "                 all        286        396      0.656      0.631      0.627      0.372\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     58/99     3.16G   0.02964   0.02105     1.218    0.2589        29       640: 100% 62/62 [00:36<00:00,  1.71it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.69it/s]\n",
            "                 all        286        396       0.73      0.638      0.699      0.405\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     59/99     3.16G    0.0284   0.02012     1.176    0.2578        41       640: 100% 62/62 [00:35<00:00,  1.73it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.55it/s]\n",
            "                 all        286        396      0.794      0.643      0.714       0.42\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     60/99     3.16G   0.02884   0.02049     1.155    0.2474        59       640: 100% 62/62 [00:37<00:00,  1.65it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.55it/s]\n",
            "                 all        286        396      0.757      0.678      0.741      0.437\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     61/99     3.16G   0.02876   0.01973     1.129    0.2418        45       640: 100% 62/62 [00:35<00:00,  1.75it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.32it/s]\n",
            "                 all        286        396      0.746      0.668      0.715      0.419\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     62/99     3.16G   0.02876   0.02016      1.15    0.2385        46       640: 100% 62/62 [00:36<00:00,  1.72it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.45it/s]\n",
            "                 all        286        396      0.712      0.704      0.734      0.431\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     63/99     3.16G   0.02874   0.01989     1.157    0.2409        41       640: 100% 62/62 [00:37<00:00,  1.68it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.43it/s]\n",
            "                 all        286        396      0.703       0.73       0.75       0.45\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     64/99     3.16G   0.02697   0.01992     1.122    0.2411        55       640: 100% 62/62 [00:36<00:00,  1.71it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.46it/s]\n",
            "                 all        286        396       0.78       0.67       0.75       0.46\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     65/99     3.16G   0.02789   0.01895     1.126    0.2379        38       640: 100% 62/62 [00:35<00:00,  1.74it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.44it/s]\n",
            "                 all        286        396      0.726      0.703      0.727      0.438\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     66/99     3.16G   0.02717   0.01929     1.101    0.2316        45       640: 100% 62/62 [00:36<00:00,  1.72it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.64it/s]\n",
            "                 all        286        396      0.714      0.697       0.72      0.436\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     67/99     3.16G   0.02725   0.01915     1.106    0.2258        52       640: 100% 62/62 [00:37<00:00,  1.67it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.53it/s]\n",
            "                 all        286        396      0.756      0.665      0.744      0.451\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     68/99     3.16G   0.02683   0.01855     1.055    0.2155        38       640: 100% 62/62 [00:35<00:00,  1.74it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.27it/s]\n",
            "                 all        286        396      0.777      0.679      0.751      0.459\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     69/99     3.16G   0.02698   0.01913     1.075    0.2179        58       640: 100% 62/62 [00:35<00:00,  1.73it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.53it/s]\n",
            "                 all        286        396      0.809      0.691      0.757      0.458\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     70/99     3.16G   0.02691   0.01857     1.074    0.2216        42       640: 100% 62/62 [00:36<00:00,  1.72it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:05<00:00,  1.75it/s]\n",
            "                 all        286        396      0.785      0.672      0.759      0.452\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     71/99     3.16G    0.0272   0.01836     1.065    0.2211        44       640: 100% 62/62 [00:35<00:00,  1.75it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.37it/s]\n",
            "                 all        286        396      0.735      0.701      0.749      0.449\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     72/99     3.16G   0.02594    0.0185     1.039    0.2147        61       640: 100% 62/62 [00:35<00:00,  1.72it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.59it/s]\n",
            "                 all        286        396      0.762      0.699      0.741       0.45\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     73/99     3.16G   0.02574   0.01836     1.027    0.2214        56       640: 100% 62/62 [00:35<00:00,  1.75it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.67it/s]\n",
            "                 all        286        396      0.773      0.684      0.744      0.449\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     74/99     3.16G   0.02578   0.01833     1.024    0.2145        43       640: 100% 62/62 [00:36<00:00,  1.68it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.37it/s]\n",
            "                 all        286        396      0.788      0.682      0.757      0.461\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     75/99     3.16G   0.02579   0.01764     1.014    0.2094        46       640: 100% 62/62 [00:36<00:00,  1.72it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.63it/s]\n",
            "                 all        286        396       0.76      0.685      0.756      0.467\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     76/99     3.16G    0.0253   0.01859     1.007    0.2053        47       640: 100% 62/62 [00:35<00:00,  1.73it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.32it/s]\n",
            "                 all        286        396      0.781      0.708      0.772      0.471\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     77/99     3.16G   0.02462   0.01821    0.9924    0.2099        44       640: 100% 62/62 [00:35<00:00,  1.73it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.41it/s]\n",
            "                 all        286        396      0.811      0.666      0.755      0.456\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     78/99     3.16G   0.02524   0.01779    0.9895       0.2        36       640: 100% 62/62 [00:36<00:00,  1.68it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.33it/s]\n",
            "                 all        286        396      0.813      0.692      0.779      0.482\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     79/99     3.16G   0.02524   0.01752    0.9945    0.1989        41       640: 100% 62/62 [00:35<00:00,  1.75it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.24it/s]\n",
            "                 all        286        396      0.764      0.706      0.767      0.473\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     80/99     3.16G   0.02584   0.01757    0.9962    0.1946        44       640: 100% 62/62 [00:35<00:00,  1.73it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.51it/s]\n",
            "                 all        286        396      0.786      0.713      0.766      0.477\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     81/99     3.16G   0.02405   0.01685    0.9354    0.1962        55       640: 100% 62/62 [00:37<00:00,  1.67it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.29it/s]\n",
            "                 all        286        396      0.814       0.69      0.771      0.478\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     82/99     3.16G   0.02469   0.01718    0.9586    0.1875        35       640: 100% 62/62 [00:36<00:00,  1.72it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.45it/s]\n",
            "                 all        286        396      0.763      0.706      0.765      0.485\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     83/99     3.16G   0.02542   0.01739    0.9882    0.1997        44       640: 100% 62/62 [00:35<00:00,  1.74it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.42it/s]\n",
            "                 all        286        396      0.802       0.71      0.779      0.496\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     84/99     3.16G   0.02441    0.0172    0.9328    0.1809        49       640: 100% 62/62 [00:36<00:00,  1.71it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.28it/s]\n",
            "                 all        286        396      0.784      0.721      0.789      0.504\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     85/99     3.16G   0.02414   0.01727    0.9424    0.1839        46       640: 100% 62/62 [00:37<00:00,  1.67it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.22it/s]\n",
            "                 all        286        396      0.762      0.763      0.797      0.504\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     86/99     3.16G    0.0243   0.01715    0.9468    0.1883        53       640: 100% 62/62 [00:36<00:00,  1.72it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.58it/s]\n",
            "                 all        286        396      0.786      0.707      0.775      0.485\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     87/99     3.16G   0.02437   0.01705     0.959    0.1885        43       640: 100% 62/62 [00:35<00:00,  1.74it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.24it/s]\n",
            "                 all        286        396      0.736      0.757      0.775       0.49\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     88/99     3.16G   0.02382   0.01621    0.9156    0.1841        52       640: 100% 62/62 [00:37<00:00,  1.66it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.35it/s]\n",
            "                 all        286        396      0.808      0.699      0.782      0.499\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     89/99     3.16G   0.02395   0.01671     0.929    0.1818        37       640: 100% 62/62 [00:35<00:00,  1.76it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.24it/s]\n",
            "                 all        286        396      0.777      0.708      0.772      0.495\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     90/99     3.16G   0.02369   0.01605     0.903    0.1813        37       640: 100% 62/62 [00:36<00:00,  1.72it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.51it/s]\n",
            "                 all        286        396      0.812      0.724      0.793      0.505\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     91/99     3.16G    0.0236   0.01643    0.9142    0.1839        43       640: 100% 62/62 [00:35<00:00,  1.73it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.44it/s]\n",
            "                 all        286        396      0.809      0.736      0.797      0.512\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     92/99     3.16G    0.0233   0.01633     0.894    0.1793        37       640: 100% 62/62 [00:37<00:00,  1.66it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.33it/s]\n",
            "                 all        286        396      0.822      0.704      0.791      0.508\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     93/99     3.16G   0.02341   0.01649    0.8997    0.1768        57       640: 100% 62/62 [00:35<00:00,  1.74it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.34it/s]\n",
            "                 all        286        396      0.796      0.738      0.793      0.511\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     94/99     3.16G   0.02308   0.01629    0.8876     0.177        41       640: 100% 62/62 [00:35<00:00,  1.73it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.35it/s]\n",
            "                 all        286        396      0.828      0.721        0.8      0.517\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     95/99     3.16G   0.02324   0.01592    0.8793    0.1713        45       640: 100% 62/62 [00:37<00:00,  1.65it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.48it/s]\n",
            "                 all        286        396       0.85        0.7      0.793      0.511\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     96/99     3.16G    0.0232     0.017    0.9121    0.1813        41       640: 100% 62/62 [00:35<00:00,  1.73it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.43it/s]\n",
            "                 all        286        396      0.811      0.726      0.795      0.512\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     97/99     3.16G   0.02252   0.01621    0.8856     0.172        50       640: 100% 62/62 [00:35<00:00,  1.75it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.32it/s]\n",
            "                 all        286        396       0.81      0.731      0.798      0.517\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     98/99     3.16G   0.02305   0.01618    0.8799    0.1716        48       640: 100% 62/62 [00:35<00:00,  1.74it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.35it/s]\n",
            "                 all        286        396      0.825      0.715      0.801      0.516\n",
            "\n",
            "     Epoch   gpu_mem       box       obj       cls    labels  img_size\n",
            "     99/99     3.16G   0.02346   0.01646     0.894    0.1703        43       640: 100% 62/62 [00:37<00:00,  1.67it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:03<00:00,  2.46it/s]\n",
            "                 all        286        396      0.793      0.733      0.799      0.519\n",
            "\n",
            "100 epochs completed in 1.141 hours.\n",
            "Optimizer stripped from runs/train/yolov5n-distilled/weights/last.pt, 3.9MB\n",
            "Optimizer stripped from runs/train/yolov5n-distilled/weights/best.pt, 3.9MB\n",
            "\n",
            "Validating runs/train/yolov5n-distilled/weights/best.pt...\n",
            "Fusing layers... \n",
            "Model Summary: 213 layers, 1765930 parameters, 0 gradients, 4.1 GFLOPs\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 9/9 [00:04<00:00,  2.13it/s]\n",
            "                 all        286        396      0.785      0.739      0.799      0.519\n",
            "                 cat        286         82      0.747      0.758        0.8      0.487\n",
            "                 cow        286         44      0.865      0.773      0.825      0.594\n",
            "               sheep        286         60       0.78       0.65      0.742      0.454\n",
            "                 dog        286        122      0.709      0.697      0.762      0.489\n",
            "               horse        286         88      0.824      0.818      0.866      0.573\n",
            "Results saved to \u001b[1mruns/train/yolov5n-distilled\u001b[0m\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "!python val.py --data data/VOC_animal.yaml --weights runs/train/yolov5n-distilled/weights/best.pt --batch-size 16"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "ss-aqIDe2mu_",
        "outputId": "eb03bf9f-6e16-4da3-d486-5d8f085cedba"
      },
      "execution_count": 27,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\u001b[34m\u001b[1mval: \u001b[0mdata=data/VOC_animal.yaml, weights=['runs/train/yolov5n-distilled/weights/best.pt'], batch_size=16, imgsz=640, conf_thres=0.001, iou_thres=0.6, task=val, device=, workers=8, single_cls=False, augment=False, verbose=False, save_txt=False, save_hybrid=False, save_conf=False, save_json=False, project=runs/val, name=exp, exist_ok=False, half=False, dnn=False\n",
            "YOLOv5 🚀 2022-2-22 torch 1.12.0+cu113 CUDA:0 (Tesla T4, 15110MiB)\n",
            "\n",
            "Fusing layers... \n",
            "Model Summary: 213 layers, 1765930 parameters, 0 gradients, 4.1 GFLOPs\n",
            "\u001b[34m\u001b[1mval: \u001b[0mScanning '/content/drive/MyDrive/yolo-distillation/data/dataset/labels/val.cache' images and labels... 286 found, 0 missing, 7 empty, 0 corrupt: 100% 286/286 [00:00<?, ?it/s]\n",
            "               Class     Images     Labels          P          R     mAP@.5 mAP@.5:.95: 100% 18/18 [00:04<00:00,  3.91it/s]\n",
            "                 all        286        396      0.797       0.74      0.801      0.521\n",
            "                 cat        286         82      0.776       0.78      0.807      0.493\n",
            "                 cow        286         44      0.872      0.772      0.825      0.592\n",
            "               sheep        286         60      0.793       0.64      0.741      0.452\n",
            "                 dog        286        122       0.72      0.705       0.76      0.495\n",
            "               horse        286         88      0.825      0.804      0.869      0.576\n",
            "Speed: 0.3ms pre-process, 3.2ms inference, 2.6ms NMS per image at shape (16, 3, 640, 640)\n",
            "Results saved to \u001b[1mruns/val/exp9\u001b[0m\n"
          ]
        }
      ]
    }
  ]
}